home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / usr / share / file / magic next >
Text File  |  2008-07-11  |  523KB  |  14,605 lines

  1. # Magic data for file(1) command.
  2. # Format is described in magic(5).
  3. # Don't edit this file, edit /etc/magic or send your suggested inclusions to
  4. # this file as a wishlist bug against file (using the reportbug utility).
  5.  
  6.  
  7. #------------------------------------------------------------------------------
  8. # Localstuff:  file(1) magic for locally observed files
  9. #
  10. # $File: Localstuff,v 1.4 2003/03/23 04:17:27 christos Exp $
  11. # Add any locally observed files here.  Remember:
  12. # text if readable, executable if runnable binary, data if unreadable.
  13. #------------------------------------------------------------------------------
  14. # acorn:  file(1) magic for files found on Acorn systems
  15. #
  16.  
  17. # RISC OS Chunk File Format
  18. # From RISC OS Programmer's Reference Manual, Appendix D
  19. # We guess the file type from the type of the first chunk.
  20. 0    lelong        0xc3cbc6c5    RISC OS Chunk data
  21. >12    string        OBJ_        \b, AOF object
  22. >12    string        LIB_        \b, ALF library
  23.  
  24. # RISC OS AIF, contains "SWI OS_Exit" at offset 16.
  25. 16    lelong        0xef000011    RISC OS AIF executable
  26.  
  27. # RISC OS Draw files
  28. # From RISC OS Programmer's Reference Manual, Appendix E
  29. 0    string         Draw        RISC OS Draw file data
  30.  
  31. # RISC OS new format font files
  32. # From RISC OS Programmer's Reference Manual, Appendix E
  33. 0    string        FONT\0        RISC OS outline font data,
  34. >5    byte        x        version %d
  35. 0    string        FONT\1        RISC OS 1bpp font data,
  36. >5    byte        x        version %d
  37. 0    string        FONT\4        RISC OS 4bpp font data
  38. >5    byte        x        version %d
  39.  
  40. # RISC OS Music files
  41. # From RISC OS Programmer's Reference Manual, Appendix E
  42. 0    string        Maestro\r    RISC OS music file
  43. >8    byte        x        version %d
  44.  
  45. >8    byte        x        type %d
  46.  
  47. # Digital Symphony data files
  48. # From: Bernard Jungen (bern8817@euphonynet.be)
  49. 0        string    \x02\x01\x13\x13\x13\x01\x0d\x10    Digital Symphony sound sample (RISC OS),
  50. >8        byte    x    version %d,
  51. >9        pstring    x    named "%s",
  52. >(9.b+19)    byte    =0    8-bit logarithmic
  53. >(9.b+19)    byte    =1    LZW-compressed linear
  54. >(9.b+19)    byte    =2    8-bit linear signed
  55. >(9.b+19)    byte    =3    16-bit linear signed
  56. >(9.b+19)    byte    =4    SigmaDelta-compressed linear
  57. >(9.b+19)    byte    =5    SigmaDelta-compressed logarithmic
  58. >(9.b+19)    byte    >5    unknown format
  59.  
  60. 0    string    \x02\x01\x13\x13\x14\x12\x01\x0b    Digital Symphony song (RISC OS),
  61. >8    byte    x    version %d,
  62. >9    byte    =1    1 voice,
  63. >9    byte    !1    %d voices,
  64. >10    leshort    =1    1 track,
  65. >10    leshort    !1    %d tracks,
  66. >12    leshort    =1    1 pattern
  67. >12    leshort    !1    %d patterns
  68.  
  69. 0    string    \x02\x01\x13\x13\x10\x14\x12\x0e
  70. >9    byte    =0    Digital Symphony sequence (RISC OS),
  71. >>8    byte    x    version %d,
  72. >>10    byte    =1    1 line,
  73. >>10    byte    !1    %d lines,
  74. >>11    leshort    =1    1 position
  75. >>11    leshort    !1    %d positions
  76. >9    byte    =1    Digital Symphony pattern data (RISC OS),
  77. >>8    byte    x    version %d,
  78. >>10    leshort    =1    1 pattern
  79. >>10    leshort    !1    %d patterns
  80.  
  81. #------------------------------------------------------------------------------
  82. # adi: file(1) magic for ADi's objects
  83. # From Gregory McGarry <g.mcgarry@ieee.org>
  84. #
  85. 0    leshort        0x521c        COFF DSP21k
  86. >18    lelong        &02        executable,
  87. >18    lelong        ^02
  88. >>18    lelong        &01        static object,
  89. >>18    lelong        ^01        relocatable object,
  90. >18    lelong        &010        stripped
  91. >18    lelong        ^010        not stripped
  92.  
  93. #------------------------------------------------------------------------------
  94. # adventure: file(1) magic for Adventure game files
  95. #
  96. # from Allen Garvin <earendil@faeryland.tamu-commerce.edu>
  97. # Edited by Dave Chapeskie <dchapes@ddm.on.ca> Jun 28, 1998
  98. # Edited by Chris Chittleborough <cchittleborough@yahoo.com.au>, March 2002
  99. #
  100. # ALAN
  101. # I assume there are other, lower versions, but these are the only ones I
  102. # saw in the archive.
  103. 0    beshort    0x0206    ALAN game data
  104. >2    byte    <10    version 2.6%d
  105.  
  106.  
  107. # Infocom (see z-machine)
  108. #------------------------------------------------------------------------------
  109. # Z-machine:  file(1) magic for Z-machine binaries.
  110. #
  111. # This will match ${TEX_BASE}/texmf/omega/ocp/char2uni/inbig5.ocp which
  112. # appears to be a version-0 Z-machine binary.
  113. #
  114. # The (false match) message is to correct that behavior.  Perhaps it is
  115. # not needed.
  116. #
  117. 16    belong&0xfe00f0f0    0x3030    Infocom game data
  118. >0    ubyte            0    (false match)
  119. >0    ubyte            >0    (Z-machine %d,
  120. >>2    ubeshort        x    Release %d /
  121. >>18    string            >\0    Serial %.6s)
  122.  
  123. #------------------------------------------------------------------------------
  124. # Glulx:  file(1) magic for Glulx binaries.
  125. #
  126. # I haven't checked for false matches yet.
  127. #
  128. 0    string            Glul    Glulx game data
  129. >4    beshort            x    (Version %d
  130. >>6    byte            x    \b.%d
  131. >>8    byte            x    \b.%d)
  132. >36    string            Info    Compiled by Inform
  133.  
  134.  
  135.  
  136. # For Quetzal and blorb magic see iff
  137.  
  138.  
  139. # TADS (Text Adventure Development System)
  140. #  All files are machine-independent (games compile to byte-code) and are tagged
  141. #  with a version string of the form "V2.<digit>.<digit>\0" (but TADS 3 is
  142. #  on the way).
  143. #  Game files start with "TADS2 bin\n\r\032\0" then the compiler version.
  144. 0    string    TADS2\ bin    TADS
  145. >9    belong  !0x0A0D1A00    game data, CORRUPTED
  146. >9    belong     0x0A0D1A00
  147. >>13    string    >\0        %s game data
  148. #  Resource files start with "TADS2 rsc\n\r\032\0" then the compiler version.
  149. 0    string    TADS2\ rsc    TADS
  150. >9    belong  !0x0A0D1A00    resource data, CORRUPTED
  151. >9    belong     0x0A0D1A00
  152. >>13    string    >\0        %s resource data
  153. #  Some saved game files start with "TADS2 save/g\n\r\032\0", a little-endian
  154. #  2-byte length N, the N-char name of the game file *without* a NUL (darn!),
  155. # "TADS2 save\n\r\032\0" and the interpreter version. 
  156. 0    string    TADS2\ save/g    TADS
  157. >12    belong    !0x0A0D1A00    saved game data, CORRUPTED
  158. >12    belong     0x0A0D1A00
  159. >>(16.s+32) string >\0        %s saved game data
  160. #  Other saved game files start with "TADS2 save\n\r\032\0" and the interpreter
  161. #  version.
  162. 0    string    TADS2\ save    TADS
  163. >10    belong    !0x0A0D1A00    saved game data, CORRUPTED
  164. >10    belong     0x0A0D1A00
  165. >>14    string    >\0        %s saved game data
  166.  
  167. # Danny Milosavljevic <danny.milo@gmx.net>
  168. # this are adrift (adventure game standard) game files, extension .taf
  169. # depending on version magic continues with 0x93453E6139FA (V 4.0)
  170. # 0x9445376139FA (V 3.90)
  171. # 0x9445366139FA (V 3.80)
  172. # this is from source (http://www.adrift.org.uk/) and I have some taf
  173. # files, and checked them.
  174. #0    belong    0x3C423FC9
  175. #>4    belong    0x6A87C2CF    Adrift game file
  176. #!:mime    application/x-adrift
  177. #------------------------------------------------------------------------------
  178. # allegro:  file(1) magic for Allegro datafiles
  179. # Toby Deshane <hac@shoelace.digivill.net>
  180. #
  181. 0 belong 0x736C6821   Allegro datafile (packed)
  182. 0 belong 0x736C682E   Allegro datafile (not packed/autodetect)
  183. 0 belong 0x736C682B   Allegro datafile (appended exe data)
  184.  
  185. #------------------------------------------------------------------------------
  186. # alliant:  file(1) magic for Alliant FX series a.out files
  187. #
  188. # If the FX series is the one that had a processor with a 68K-derived
  189. # instruction set, the "short" should probably become "beshort" and the
  190. # "long" should probably become "belong".
  191. # If it's the i860-based one, they should probably become either the
  192. # big-endian or little-endian versions, depending on the mode they ran
  193. # the 860 in....
  194. #
  195. 0    short        0420        0420 Alliant virtual executable
  196. >2    short        &0x0020        common library
  197. >16    long        >0        not stripped
  198. 0    short        0421        0421 Alliant compact executable
  199. >2    short        &0x0020        common library
  200. >16    long        >0        not stripped
  201. #------------------------------------------------------------------------------
  202. # alpha architecture description
  203. #
  204.  
  205. 0    leshort        0603        COFF format alpha
  206. >22    leshort&030000    !020000        executable
  207. >24    leshort        0410        pure
  208. >24    leshort        0413        paged
  209. >22    leshort&020000    !0        dynamically linked
  210. >16    lelong        !0        not stripped
  211. >16    lelong        0        stripped
  212. >22    leshort&030000    020000        shared library
  213. >24    leshort        0407        object
  214. >27    byte        x        - version %d
  215. >26    byte        x        .%d
  216. >28    byte        x        -%d
  217.  
  218. # Basic recognition of Digital UNIX core dumps - Mike Bremford <mike@opac.bl.uk>
  219. #
  220. # The actual magic number is just "Core", followed by a 2-byte version
  221. # number; however, treating any file that begins with "Core" as a Digital
  222. # UNIX core dump file may produce too many false hits, so we include one
  223. # byte of the version number as well; DU 5.0 appears only to be up to
  224. # version 2.
  225. #
  226. 0    string        Core\001    Alpha COFF format core dump (Digital UNIX)
  227. >24    string        >\0        \b, from '%s'
  228. 0    string        Core\002    Alpha COFF format core dump (Digital UNIX)
  229. >24    string        >\0        \b, from '%s'
  230.  
  231. #------------------------------------------------------------------------------
  232. # amanda:  file(1) magic for amanda file format
  233. #
  234. 0    string    AMANDA:\         AMANDA 
  235. >8    string    TAPESTART\ DATE        tape header file,
  236. >>23    string    X
  237. >>>25    string    >\             Unused %s
  238. >>23    string    >\             DATE %s
  239. >8    string    FILE\             dump file,
  240. >>13    string    >\             DATE %s
  241. #------------------------------------------------------------------------------
  242. # amigaos:  file(1) magic for AmigaOS binary formats:
  243.  
  244. #
  245. # From ignatios@cs.uni-bonn.de (Ignatios Souvatzis)
  246. #
  247. 0    belong        0x000003fa    AmigaOS shared library
  248. 0    belong        0x000003f3    AmigaOS loadseg()ble executable/binary
  249. 0    belong        0x000003e7    AmigaOS object/library data
  250. #
  251. 0    beshort        0xe310        Amiga Workbench
  252. >2    beshort        1        
  253. >>48    byte        1        disk icon
  254. >>48    byte        2        drawer icon
  255. >>48    byte        3        tool icon
  256. >>48    byte        4        project icon
  257. >>48    byte        5        garbage icon
  258. >>48    byte        6        device icon
  259. >>48    byte        7        kickstart icon
  260. >>48    byte        8        workbench application icon
  261. >2    beshort        >1        icon, vers. %d
  262. #
  263. # various sound formats from the Amiga
  264. # G=F6tz Waschk <waschk@informatik.uni-rostock.de>
  265. #
  266. 0    string        FC14        Future Composer 1.4 Module sound file
  267. 0    string        SMOD        Future Composer 1.3 Module sound file
  268. 0    string        AON4artofnoise    Art Of Noise Module sound file
  269. 1    string        MUGICIAN/SOFTEYES Mugician Module sound file
  270. 58    string        SIDMON\ II\ -\ THE    Sidmon 2.0 Module sound file
  271. 0    string        Synth4.0    Synthesis Module sound file
  272. 0    string        ARP.        The Holy Noise Module sound file
  273. 0    string        BeEp\0        JamCracker Module sound file
  274. 0    string        COSO\0        Hippel-COSO Module sound file
  275. # Too simple (short, pure ASCII, deep), MPi
  276. #26    string        V.3        Brian Postma's Soundmon Module sound file v3
  277. #26    string        BPSM        Brian Postma's Soundmon Module sound file v3
  278. #26    string        V.2        Brian Postma's Soundmon Module sound file v2
  279.  
  280. # The following are from: "Stefan A. Haubenthal" <polluks@web.de>
  281. 0    beshort        0x0f00        AmigaOS bitmap font
  282. 0    beshort        0x0f03        AmigaOS outline font
  283. 0    belong        0x80001001    AmigaOS outline tag
  284. 0    string        ##\ version    catalog translation
  285. 0    string        EMOD\0        Amiga E module
  286. 8    string        ECXM\0        ECX module
  287. 0    string/c    @database    AmigaGuide file
  288.  
  289. # Amiga disk types
  290. 0    string        RDSK        Rigid Disk Block
  291. >160    string        x        on %.24s
  292. 0    string        DOS\0        Amiga DOS disk
  293. 0    string        DOS\1        Amiga FFS disk
  294. 0    string        DOS\2        Amiga Inter DOS disk
  295. 0    string        DOS\3        Amiga Inter FFS disk
  296. 0    string        DOS\4        Amiga Fastdir DOS disk
  297. 0    string        DOS\5        Amiga Fastdir FFS disk
  298. 0    string        KICK        Kickstart disk
  299.  
  300. # From: Alex Beregszaszi <alex@fsn.hu>
  301. 0    string        LZX        LZX compressed archive (Amiga)
  302.  
  303.  
  304. #------------------------------------------------------------------------------
  305. # animation:  file(1) magic for animation/movie formats
  306. #
  307. # animation formats
  308. # MPEG, FLI, DL originally from vax@ccwf.cc.utexas.edu (VaX#n8)
  309. # FLC, SGI, Apple originally from Daniel Quinlan (quinlan@yggdrasil.com)
  310.  
  311. # SGI and Apple formats
  312. 0    string        MOVI        Silicon Graphics movie file
  313. !:mime    video/x-sgi-movie
  314. 4       string          moov            Apple QuickTime
  315. !:mime    video/quicktime
  316. >12     string          mvhd            \b movie (fast start)
  317. >12     string          mdra            \b URL
  318. >12     string          cmov            \b movie (fast start, compressed header)
  319. >12     string          rmra            \b multiple URLs
  320. 4       string          mdat            Apple QuickTime movie (unoptimized)
  321. !:mime    video/quicktime
  322. #4       string          wide            Apple QuickTime movie (unoptimized)
  323. #!:mime    video/quicktime
  324. #4       string          skip            Apple QuickTime movie (modified)
  325. #!:mime    video/quicktime
  326. #4       string          free            Apple QuickTime movie (modified)
  327. #!:mime    video/quicktime
  328. 4       string          idsc            Apple QuickTime image (fast start)
  329. !:mime    image/x-quicktime
  330. #4       string          idat            Apple QuickTime image (unoptimized)
  331. #!:mime    image/x-quicktime
  332. 4       string          pckg            Apple QuickTime compressed archive
  333. !:mime    application/x-quicktime-player
  334. 4    string/B    jP        JPEG 2000 image
  335. !:mime    image/jp2
  336. 4    string        ftyp        ISO Media
  337. >8    string        isom        \b, MPEG v4 system, version 1
  338. !:mime    video/mp4
  339. >8    string        iso2        \b, MPEG v4 system, part 12 revision
  340. >8    string        mp41        \b, MPEG v4 system, version 1
  341. !:mime    video/mp4
  342. >8    string        mp42        \b, MPEG v4 system, version 2
  343. !:mime    video/mp4
  344. >8    string        mp7t        \b, MPEG v4 system, MPEG v7 XML
  345. >8    string        mp7b        \b, MPEG v4 system, MPEG v7 binary XML
  346. >8    string/B    jp2        \b, JPEG 2000
  347. !:mime    image/jp2
  348. >8    string        3gp        \b, MPEG v4 system, 3GPP
  349. !:mime    video/3gpp
  350. >>11    byte        4        \b v4 (H.263/AMR GSM 6.10)
  351. >>11    byte        5        \b v5 (H.263/AMR GSM 6.10)
  352. >>11    byte        6        \b v6 (ITU H.264/AMR GSM 6.10)
  353. >8    string        mmp4        \b, MPEG v4 system, 3GPP Mobile
  354. !:mime    video/mp4
  355. >8    string        avc1        \b, MPEG v4 system, 3GPP JVT AVC
  356. !:mime    video/3gpp
  357. >8    string/B    M4A        \b, MPEG v4 system, iTunes AAC-LC
  358. !:mime    audio/mp4
  359. >8    string/B    M4V        \b, MPEG v4 system, iTunes AVC-LC
  360. !:mime    video/mp4
  361. >8    string/B    M4P        \b, MPEG v4 system, iTunes AES encrypted
  362. >8    string/B    M4B        \b, MPEG v4 system, iTunes bookmarked
  363. >8    string/B    qt        \b, Apple QuickTime movie
  364. !:mime    video/quicktime
  365.  
  366. # MPEG sequences
  367. # Scans for all common MPEG header start codes
  368. 0        belong             0x00000001     JVT NAL sequence
  369. >4       byte&0x1F          0x07           \b, H.264 video
  370. >>5      byte               66             \b, baseline
  371. >>5      byte               77             \b, main
  372. >>5      byte               88             \b, extended
  373. >>7      byte               x              \b @ L %u
  374. 0        string             \000\000\001   MPEG sequence
  375. >3       byte               0xBA
  376. >>4      byte               &0x40          \b, v2, program multiplex
  377. >>4      byte               ^0x40          \b, v1, system multiplex
  378. >3       byte               0xBB           \b, v1/2, multiplex (missing pack header)
  379. >3       byte&0x1F          0x07           \b, H.264 video
  380. >>4      byte               66             \b, baseline
  381. >>4      byte               77             \b, main
  382. >>4      byte               88             \b, extended
  383. >>6      byte               x              \b @ L %u
  384. >3       byte               0xB0           \b, v4
  385. >>5      belong             0x000001B5
  386. >>>9     byte               &0x80
  387. >>>>10   byte&0xF0          16             \b, video
  388. >>>>10   byte&0xF0          32             \b, still texture
  389. >>>>10   byte&0xF0          48             \b, mesh
  390. >>>>10   byte&0xF0          64             \b, face
  391. >>>9     byte&0xF8          8              \b, video
  392. >>>9     byte&0xF8          16             \b, still texture
  393. >>>9     byte&0xF8          24             \b, mesh
  394. >>>9     byte&0xF8          32             \b, face
  395. >>4      byte               1              \b, simple @ L1
  396. >>4      byte               2              \b, simple @ L2
  397. >>4      byte               3              \b, simple @ L3
  398. >>4      byte               4              \b, simple @ L0
  399. >>4      byte               17             \b, simple scalable @ L1
  400. >>4      byte               18             \b, simple scalable @ L2
  401. >>4      byte               33             \b, core @ L1
  402. >>4      byte               34             \b, core @ L2
  403. >>4      byte               50             \b, main @ L2
  404. >>4      byte               51             \b, main @ L3
  405. >>4      byte               53             \b, main @ L4
  406. >>4      byte               66             \b, n-bit @ L2
  407. >>4      byte               81             \b, scalable texture @ L1
  408. >>4      byte               97             \b, simple face animation @ L1
  409. >>4      byte               98             \b, simple face animation @ L2
  410. >>4      byte               99             \b, simple face basic animation @ L1
  411. >>4      byte               100            \b, simple face basic animation @ L2
  412. >>4      byte               113            \b, basic animation text @ L1
  413. >>4      byte               114            \b, basic animation text @ L2
  414. >>4      byte               129            \b, hybrid @ L1
  415. >>4      byte               130            \b, hybrid @ L2
  416. >>4      byte               145            \b, advanced RT simple @ L!
  417. >>4      byte               146            \b, advanced RT simple @ L2
  418. >>4      byte               147            \b, advanced RT simple @ L3
  419. >>4      byte               148            \b, advanced RT simple @ L4
  420. >>4      byte               161            \b, core scalable @ L1
  421. >>4      byte               162            \b, core scalable @ L2
  422. >>4      byte               163            \b, core scalable @ L3
  423. >>4      byte               177            \b, advanced coding efficiency @ L1
  424. >>4      byte               178            \b, advanced coding efficiency @ L2
  425. >>4      byte               179            \b, advanced coding efficiency @ L3
  426. >>4      byte               180            \b, advanced coding efficiency @ L4
  427. >>4      byte               193            \b, advanced core @ L1
  428. >>4      byte               194            \b, advanced core @ L2
  429. >>4      byte               209            \b, advanced scalable texture @ L1
  430. >>4      byte               210            \b, advanced scalable texture @ L2
  431. >>4      byte               211            \b, advanced scalable texture @ L3
  432. >>4      byte               225            \b, simple studio @ L1
  433. >>4      byte               226            \b, simple studio @ L2
  434. >>4      byte               227            \b, simple studio @ L3
  435. >>4      byte               228            \b, simple studio @ L4
  436. >>4      byte               229            \b, core studio @ L1
  437. >>4      byte               230            \b, core studio @ L2
  438. >>4      byte               231            \b, core studio @ L3
  439. >>4      byte               232            \b, core studio @ L4
  440. >>4      byte               240            \b, advanced simple @ L0
  441. >>4      byte               241            \b, advanced simple @ L1
  442. >>4      byte               242            \b, advanced simple @ L2
  443. >>4      byte               243            \b, advanced simple @ L3
  444. >>4      byte               244            \b, advanced simple @ L4
  445. >>4      byte               245            \b, advanced simple @ L5
  446. >>4      byte               247            \b, advanced simple @ L3b
  447. >>4      byte               248            \b, FGS @ L0
  448. >>4      byte               249            \b, FGS @ L1
  449. >>4      byte               250            \b, FGS @ L2
  450. >>4      byte               251            \b, FGS @ L3
  451. >>4      byte               252            \b, FGS @ L4
  452. >>4      byte               253            \b, FGS @ L5
  453. >3       byte               0xB5           \b, v4
  454. >>4      byte               &0x80
  455. >>>5     byte&0xF0          16             \b, video (missing profile header)
  456. >>>5     byte&0xF0          32             \b, still texture (missing profile header)
  457. >>>5     byte&0xF0          48             \b, mesh (missing profile header)
  458. >>>5     byte&0xF0          64             \b, face (missing profile header)
  459. >>4      byte&0xF8          8              \b, video (missing profile header)
  460. >>4      byte&0xF8          16             \b, still texture (missing profile header)
  461. >>4      byte&0xF8          24             \b, mesh (missing profile header)
  462. >>4      byte&0xF8          32             \b, face (missing profile header)
  463. >3       byte               0xB3
  464. >>12     belong             0x000001B8     \b, v1, progressive Y'CbCr 4:2:0 video
  465. >>12     belong             0x000001B2     \b, v1, progressive Y'CbCr 4:2:0 video
  466. >>12     belong             0x000001B5     \b, v2,
  467. >>>16    byte&0x0F          1              \b HP
  468. >>>16    byte&0x0F          2              \b Spt
  469. >>>16    byte&0x0F          3              \b SNR
  470. >>>16    byte&0x0F          4              \b MP
  471. >>>16    byte&0x0F          5              \b SP
  472. >>>17    byte&0xF0          64             \b@HL
  473. >>>17    byte&0xF0          96             \b@H-14
  474. >>>17    byte&0xF0          128            \b@ML
  475. >>>17    byte&0xF0          160            \b@LL
  476. >>>17    byte               &0x08          \b progressive
  477. >>>17    byte               ^0x08          \b interlaced
  478. >>>17    byte&0x06          2              \b Y'CbCr 4:2:0 video
  479. >>>17    byte&0x06          4              \b Y'CbCr 4:2:2 video
  480. >>>17    byte&0x06          6              \b Y'CbCr 4:4:4 video
  481. >>11     byte               &0x02
  482. >>>75    byte               &0x01
  483. >>>>140  belong             0x000001B8     \b, v1, progressive Y'CbCr 4:2:0 video
  484. >>>>140  belong             0x000001B2     \b, v1, progressive Y'CbCr 4:2:0 video
  485. >>>>140  belong             0x000001B5     \b, v2,
  486. >>>>>144 byte&0x0F          1              \b HP
  487. >>>>>144 byte&0x0F          2              \b Spt
  488. >>>>>144 byte&0x0F          3              \b SNR
  489. >>>>>144 byte&0x0F          4              \b MP
  490. >>>>>144 byte&0x0F          5              \b SP
  491. >>>>>145 byte&0xF0          64             \b@HL
  492. >>>>>145 byte&0xF0          96             \b@H-14
  493. >>>>>145 byte&0xF0          128            \b@ML
  494. >>>>>145 byte&0xF0          160            \b@LL
  495. >>>>>145 byte               &0x08          \b progressive
  496. >>>>>145 byte               ^0x08          \b interlaced
  497. >>>>>145 byte&0x06          2              \b Y'CbCr 4:2:0 video
  498. >>>>>145 byte&0x06          4              \b Y'CbCr 4:2:2 video
  499. >>>>>145 byte&0x06          6              \b Y'CbCr 4:4:4 video
  500. >>76    belong             0x000001B8     \b, v1, progressive Y'CbCr 4:2:0 video
  501. >>76    belong             0x000001B2     \b, v1, progressive Y'CbCr 4:2:0 video
  502. >>76    belong             0x000001B5     \b, v2,
  503. >>>80   byte&0x0F          1              \b HP
  504. >>>80   byte&0x0F          2              \b Spt
  505. >>>80   byte&0x0F          3              \b SNR
  506. >>>80   byte&0x0F          4              \b MP
  507. >>>80   byte&0x0F          5              \b SP
  508. >>>81   byte&0xF0          64             \b@HL
  509. >>>81   byte&0xF0          96             \b@H-14
  510. >>>81   byte&0xF0          128            \b@ML
  511. >>>81   byte&0xF0          160            \b@LL
  512. >>>81   byte               &0x08          \b progressive
  513. >>>81   byte               ^0x08          \b interlaced
  514. >>>81   byte&0x06          2              \b Y'CbCr 4:2:0 video
  515. >>>81   byte&0x06          4              \b Y'CbCr 4:2:2 video
  516. >>>81   byte&0x06          6              \b Y'CbCr 4:4:4 video
  517. >>4      belong&0xFFFFFF00  0x78043800     \b, HD-TV 1920P
  518. >>>7     byte&0xF0          0x10           \b, 16:9
  519. >>4      belong&0xFFFFFF00  0x50002D00     \b, SD-TV 1280I
  520. >>>7     byte&0xF0          0x10           \b, 16:9
  521. >>4      belong&0xFFFFFF00  0x30024000     \b, PAL Capture
  522. >>>7     byte&0xF0          0x10           \b, 4:3
  523. >>4      beshort&0xFFF0     0x2C00         \b, 4CIF
  524. >>>5     beshort&0x0FFF     0x01E0         \b NTSC
  525. >>>5     beshort&0x0FFF     0x0240         \b PAL
  526. >>>7     byte&0xF0          0x20           \b, 4:3
  527. >>>7     byte&0xF0          0x30           \b, 16:9
  528. >>>7     byte&0xF0          0x40           \b, 11:5
  529. >>>7     byte&0xF0          0x80           \b, PAL 4:3
  530. >>>7     byte&0xF0          0xC0           \b, NTSC 4:3
  531. >>4      belong&0xFFFFFF00  0x2801E000     \b, LD-TV 640P
  532. >>>7     byte&0xF0          0x10           \b, 4:3
  533. >>4      belong&0xFFFFFF00  0x1400F000     \b, 320x240
  534. >>>7     byte&0xF0          0x10           \b, 4:3
  535. >>4      belong&0xFFFFFF00  0x0F00A000     \b, 240x160
  536. >>>7     byte&0xF0          0x10           \b, 4:3
  537. >>4      belong&0xFFFFFF00  0x0A007800     \b, 160x120
  538. >>>7     byte&0xF0          0x10           \b, 4:3
  539. >>4      beshort&0xFFF0     0x1600         \b, CIF
  540. >>>5     beshort&0x0FFF     0x00F0         \b NTSC
  541. >>>5     beshort&0x0FFF     0x0120         \b PAL
  542. >>>7     byte&0xF0          0x20           \b, 4:3
  543. >>>7     byte&0xF0          0x30           \b, 16:9
  544. >>>7     byte&0xF0          0x40           \b, 11:5
  545. >>>7     byte&0xF0          0x80           \b, PAL 4:3
  546. >>>7     byte&0xF0          0xC0           \b, NTSC 4:3
  547. >>>5     beshort&0x0FFF     0x0240         \b PAL 625
  548. >>>>7    byte&0xF0          0x20           \b, 4:3
  549. >>>>7    byte&0xF0          0x30           \b, 16:9
  550. >>>>7    byte&0xF0          0x40           \b, 11:5
  551. >>4      beshort&0xFFF0     0x2D00         \b, CCIR/ITU
  552. >>>5     beshort&0x0FFF     0x01E0         \b NTSC 525
  553. >>>5     beshort&0x0FFF     0x0240         \b PAL 625
  554. >>>7     byte&0xF0          0x20           \b, 4:3
  555. >>>7     byte&0xF0          0x30           \b, 16:9
  556. >>>7     byte&0xF0          0x40           \b, 11:5
  557. >>4      beshort&0xFFF0     0x1E00         \b, SVCD
  558. >>>5     beshort&0x0FFF     0x01E0         \b NTSC 525
  559. >>>5     beshort&0x0FFF     0x0240         \b PAL 625
  560. >>>7     byte&0xF0          0x20           \b, 4:3
  561. >>>7     byte&0xF0          0x30           \b, 16:9
  562. >>>7     byte&0xF0          0x40           \b, 11:5
  563. >>7      byte&0x0F          1              \b, 23.976 fps
  564. >>7      byte&0x0F          2              \b, 24 fps
  565. >>7      byte&0x0F          3              \b, 25 fps
  566. >>7      byte&0x0F          4              \b, 29.97 fps
  567. >>7      byte&0x0F          5              \b, 30 fps
  568. >>7      byte&0x0F          6              \b, 50 fps
  569. >>7      byte&0x0F          7              \b, 59.94 fps
  570. >>7      byte&0x0F          8              \b, 60 fps
  571. >>11     byte               &0x04          \b, Constrained
  572.  
  573. # MPEG ADTS Audio (*.mpx/mxa/aac)
  574. # from dreesen@math.fu-berlin.de
  575. # modified to fully support MPEG ADTS
  576.  
  577. # MP3, M1A
  578. # modified by Joerg Jenderek
  579. # GRR the original test are too common for many DOS files
  580. # so don't accept as MP3 until we've tested the rate
  581. 0    beshort&0xFFFE 0xFFFA
  582. # rates
  583. >2      byte&0xF0       0x10           MPEG ADTS, layer III, v1,  32 kbps
  584. !:mime    audio/mpeg
  585. >2      byte&0xF0       0x20           MPEG ADTS, layer III, v1,  40 kbps
  586. !:mime    audio/mpeg
  587. >2      byte&0xF0       0x30           MPEG ADTS, layer III, v1,  48 kbps
  588. !:mime    audio/mpeg
  589. >2      byte&0xF0       0x40           MPEG ADTS, layer III, v1,  56 kbps
  590. !:mime    audio/mpeg
  591. >2      byte&0xF0       0x50           MPEG ADTS, layer III, v1,  64 kbps
  592. !:mime    audio/mpeg
  593. >2      byte&0xF0       0x60           MPEG ADTS, layer III, v1,  80 kbps
  594. !:mime    audio/mpeg
  595. >2      byte&0xF0       0x70           MPEG ADTS, layer III, v1,  96 kbps
  596. !:mime    audio/mpeg
  597. >2      byte&0xF0       0x80           MPEG ADTS, layer III, v1, 112 kbps
  598. !:mime    audio/mpeg
  599. >2      byte&0xF0       0x90           MPEG ADTS, layer III, v1, 128 kbps
  600. !:mime    audio/mpeg
  601. >2      byte&0xF0       0xA0           MPEG ADTS, layer III, v1, 160 kbps
  602. !:mime    audio/mpeg
  603. >2      byte&0xF0       0xB0           MPEG ADTS, layer III, v1, 192 kbps
  604. !:mime    audio/mpeg
  605. >2      byte&0xF0       0xC0           MPEG ADTS, layer III, v1, 224 kbps
  606. !:mime    audio/mpeg
  607. >2      byte&0xF0       0xD0           MPEG ADTS, layer III, v1, 256 kbps
  608. !:mime    audio/mpeg
  609. >2      byte&0xF0       0xE0           MPEG ADTS, layer III, v1, 320 kbps
  610. !:mime    audio/mpeg
  611. # timing
  612. >2      byte&0x0C       0x00           \b, 44.1 kHz
  613. >2      byte&0x0C       0x04           \b, 48 kHz
  614. >2      byte&0x0C       0x08           \b, 32 kHz
  615. # channels/options
  616. >3      byte&0xC0       0x00           \b, Stereo
  617. >3      byte&0xC0       0x40           \b, JntStereo
  618. >3      byte&0xC0       0x80           \b, 2x Monaural
  619. >3      byte&0xC0       0xC0           \b, Monaural
  620. #>1     byte            ^0x01          \b, Data Verify
  621. #>2     byte            &0x02          \b, Packet Pad
  622. #>2     byte            &0x01          \b, Custom Flag
  623. #>3     byte            &0x08          \b, Copyrighted
  624. #>3     byte            &0x04          \b, Original Source
  625. #>3     byte&0x03       1              \b, NR: 50/15 ms
  626. #>3     byte&0x03       3              \b, NR: CCIT J.17
  627.  
  628. # MP2, M1A
  629. 0       beshort&0xFFFE  0xFFFC         MPEG ADTS, layer II, v1
  630. # rates
  631. >2      byte&0xF0       0x10           \b,  32 kbps
  632. >2      byte&0xF0       0x20           \b,  48 kbps
  633. >2      byte&0xF0       0x30           \b,  56 kbps
  634. >2      byte&0xF0       0x40           \b,  64 kbps
  635. >2      byte&0xF0       0x50           \b,  80 kbps
  636. >2      byte&0xF0       0x60           \b,  96 kbps
  637. >2      byte&0xF0       0x70           \b, 112 kbps
  638. >2      byte&0xF0       0x80           \b, 128 kbps
  639. >2      byte&0xF0       0x90           \b, 160 kbps
  640. >2      byte&0xF0       0xA0           \b, 192 kbps
  641. >2      byte&0xF0       0xB0           \b, 224 kbps
  642. >2      byte&0xF0       0xC0           \b, 256 kbps
  643. >2      byte&0xF0       0xD0           \b, 320 kbps
  644. >2      byte&0xF0       0xE0           \b, 384 kbps
  645. # timing
  646. >2      byte&0x0C       0x00           \b, 44.1 kHz
  647. >2      byte&0x0C       0x04           \b, 48 kHz
  648. >2      byte&0x0C       0x08           \b, 32 kHz
  649. # channels/options
  650. >3      byte&0xC0       0x00           \b, Stereo
  651. >3      byte&0xC0       0x40           \b, JntStereo
  652. >3      byte&0xC0       0x80           \b, 2x Monaural
  653. >3      byte&0xC0       0xC0           \b, Monaural
  654. #>1     byte            ^0x01          \b, Data Verify
  655. #>2     byte            &0x02          \b, Packet Pad
  656. #>2     byte            &0x01          \b, Custom Flag
  657. #>3     byte            &0x08          \b, Copyrighted
  658. #>3     byte            &0x04          \b, Original Source
  659. #>3     byte&0x03       1              \b, NR: 50/15 ms
  660. #>3     byte&0x03       3              \b, NR: CCIT J.17
  661.  
  662. # MPA, M1A
  663. # updated by Joerg Jenderek
  664. # GRR the original test are too common for many DOS files, so test 32 <= kbits <= 448
  665. # GRR this test is still too general as it catches a BOM of UTF-16 files (0xFFFE)
  666. #0    beshort&0xFFFE        0xFFFE    
  667. #>2    ubyte&0xF0    >0x0F        
  668. #>>2    ubyte&0xF0    <0xE1        MPEG ADTS, layer I, v1
  669. ## rate
  670. #>>>2      byte&0xF0       0x10           \b,  32 kbps
  671. #>>>2      byte&0xF0       0x20           \b,  64 kbps
  672. #>>>2      byte&0xF0       0x30           \b,  96 kbps
  673. #>>>2      byte&0xF0       0x40           \b, 128 kbps
  674. #>>>2      byte&0xF0       0x50           \b, 160 kbps
  675. #>>>2      byte&0xF0       0x60           \b, 192 kbps
  676. #>>>2      byte&0xF0       0x70           \b, 224 kbps
  677. #>>>2      byte&0xF0       0x80           \b, 256 kbps
  678. #>>>2      byte&0xF0       0x90           \b, 288 kbps
  679. #>>>2      byte&0xF0       0xA0           \b, 320 kbps
  680. #>>>2      byte&0xF0       0xB0           \b, 352 kbps
  681. #>>>2      byte&0xF0       0xC0           \b, 384 kbps
  682. #>>>2      byte&0xF0       0xD0           \b, 416 kbps
  683. #>>>2      byte&0xF0       0xE0           \b, 448 kbps
  684. ## timing
  685. #>>>2      byte&0x0C       0x00           \b, 44.1 kHz
  686. #>>>2      byte&0x0C       0x04           \b, 48 kHz
  687. #>>>2      byte&0x0C       0x08           \b, 32 kHz
  688. ## channels/options
  689. #>>>3      byte&0xC0       0x00           \b, Stereo
  690. #>>>3      byte&0xC0       0x40           \b, JntStereo
  691. #>>>3      byte&0xC0       0x80           \b, 2x Monaural
  692. #>>>3      byte&0xC0       0xC0           \b, Monaural
  693. ##>1     byte            ^0x01          \b, Data Verify
  694. ##>2     byte            &0x02          \b, Packet Pad
  695. ##>2     byte            &0x01          \b, Custom Flag
  696. ##>3     byte            &0x08          \b, Copyrighted
  697. ##>3     byte            &0x04          \b, Original Source
  698. ##>3     byte&0x03       1              \b, NR: 50/15 ms
  699. ##>3     byte&0x03       3              \b, NR: CCIT J.17
  700.  
  701. # MP3, M2A
  702. 0       beshort&0xFFFE  0xFFF2         MPEG ADTS, layer III, v2
  703. # rate
  704. >2      byte&0xF0       0x10           \b,   8 kbps
  705. >2      byte&0xF0       0x20           \b,  16 kbps
  706. >2      byte&0xF0       0x30           \b,  24 kbps
  707. >2      byte&0xF0       0x40           \b,  32 kbps
  708. >2      byte&0xF0       0x50           \b,  40 kbps
  709. >2      byte&0xF0       0x60           \b,  48 kbps
  710. >2      byte&0xF0       0x70           \b,  56 kbps
  711. >2      byte&0xF0       0x80           \b,  64 kbps
  712. >2      byte&0xF0       0x90           \b,  80 kbps
  713. >2      byte&0xF0       0xA0           \b,  96 kbps
  714. >2      byte&0xF0       0xB0           \b, 112 kbps
  715. >2      byte&0xF0       0xC0           \b, 128 kbps
  716. >2      byte&0xF0       0xD0           \b, 144 kbps
  717. >2      byte&0xF0       0xE0           \b, 160 kbps
  718. # timing
  719. >2      byte&0x0C       0x00           \b, 22.05 kHz
  720. >2      byte&0x0C       0x04           \b, 24 kHz
  721. >2      byte&0x0C       0x08           \b, 16 kHz
  722. # channels/options
  723. >3      byte&0xC0       0x00           \b, Stereo
  724. >3      byte&0xC0       0x40           \b, JntStereo
  725. >3      byte&0xC0       0x80           \b, 2x Monaural
  726. >3      byte&0xC0       0xC0           \b, Monaural
  727. #>1     byte            ^0x01          \b, Data Verify
  728. #>2     byte            &0x02          \b, Packet Pad
  729. #>2     byte            &0x01          \b, Custom Flag
  730. #>3     byte            &0x08          \b, Copyrighted
  731. #>3     byte            &0x04          \b, Original Source
  732. #>3     byte&0x03       1              \b, NR: 50/15 ms
  733. #>3     byte&0x03       3              \b, NR: CCIT J.17
  734.  
  735. # MP2, M2A
  736. 0       beshort&0xFFFE  0xFFF4         MPEG ADTS, layer II, v2
  737. # rate 
  738. >2      byte&0xF0       0x10           \b,   8 kbps
  739. >2      byte&0xF0       0x20           \b,  16 kbps 
  740. >2      byte&0xF0       0x30           \b,  24 kbps
  741. >2      byte&0xF0       0x40           \b,  32 kbps
  742. >2      byte&0xF0       0x50           \b,  40 kbps
  743. >2      byte&0xF0       0x60           \b,  48 kbps
  744. >2      byte&0xF0       0x70           \b,  56 kbps
  745. >2      byte&0xF0       0x80           \b,  64 kbps
  746. >2      byte&0xF0       0x90           \b,  80 kbps
  747. >2      byte&0xF0       0xA0           \b,  96 kbps
  748. >2      byte&0xF0       0xB0           \b, 112 kbps
  749. >2      byte&0xF0       0xC0           \b, 128 kbps
  750. >2      byte&0xF0       0xD0           \b, 144 kbps
  751. >2      byte&0xF0       0xE0           \b, 160 kbps
  752. # timing
  753. >2      byte&0x0C       0x00           \b, 22.05 kHz
  754. >2      byte&0x0C       0x04           \b, 24 kHz
  755. >2      byte&0x0C       0x08           \b, 16 kHz
  756. # channels/options
  757. >3      byte&0xC0       0x00           \b, Stereo
  758. >3      byte&0xC0       0x40           \b, JntStereo
  759. >3      byte&0xC0       0x80           \b, 2x Monaural
  760. >3      byte&0xC0       0xC0           \b, Monaural
  761. #>1     byte            ^0x01          \b, Data Verify
  762. #>2     byte            &0x02          \b, Packet Pad
  763. #>2     byte            &0x01          \b, Custom Flag
  764. #>3     byte            &0x08          \b, Copyrighted
  765. #>3     byte            &0x04          \b, Original Source
  766. #>3     byte&0x03       1              \b, NR: 50/15 ms
  767. #>3     byte&0x03       3              \b, NR: CCIT J.17
  768.  
  769. # MPA, M2A
  770. 0       beshort&0xFFFE  0xFFF6         MPEG ADTS, layer I, v2
  771. # rate
  772. >2      byte&0xF0       0x10           \b,  32 kbps
  773. >2      byte&0xF0       0x20           \b,  48 kbps
  774. >2      byte&0xF0       0x30           \b,  56 kbps
  775. >2      byte&0xF0       0x40           \b,  64 kbps
  776. >2      byte&0xF0       0x50           \b,  80 kbps
  777. >2      byte&0xF0       0x60           \b,  96 kbps
  778. >2      byte&0xF0       0x70           \b, 112 kbps
  779. >2      byte&0xF0       0x80           \b, 128 kbps
  780. >2      byte&0xF0       0x90           \b, 144 kbps
  781. >2      byte&0xF0       0xA0           \b, 160 kbps
  782. >2      byte&0xF0       0xB0           \b, 176 kbps
  783. >2      byte&0xF0       0xC0           \b, 192 kbps
  784. >2      byte&0xF0       0xD0           \b, 224 kbps
  785. >2      byte&0xF0       0xE0           \b, 256 kbps
  786. # timing
  787. >2      byte&0x0C       0x00           \b, 22.05 kHz
  788. >2      byte&0x0C       0x04           \b, 24 kHz
  789. >2      byte&0x0C       0x08           \b, 16 kHz
  790. # channels/options
  791. >3      byte&0xC0       0x00           \b, Stereo
  792. >3      byte&0xC0       0x40           \b, JntStereo
  793. >3      byte&0xC0       0x80           \b, 2x Monaural
  794. >3      byte&0xC0       0xC0           \b, Monaural
  795. #>1     byte            ^0x01          \b, Data Verify
  796. #>2     byte            &0x02          \b, Packet Pad
  797. #>2     byte            &0x01          \b, Custom Flag
  798. #>3     byte            &0x08          \b, Copyrighted
  799. #>3     byte            &0x04          \b, Original Source
  800. #>3     byte&0x03       1              \b, NR: 50/15 ms
  801. #>3     byte&0x03       3              \b, NR: CCIT J.17
  802.  
  803. # MP3, M25A
  804. 0       beshort&0xFFFE  0xFFE2         MPEG ADTS, layer III,  v2.5
  805. # rate  
  806. >2      byte&0xF0       0x10           \b,   8 kbps
  807. >2      byte&0xF0       0x20           \b,  16 kbps
  808. >2      byte&0xF0       0x30           \b,  24 kbps
  809. >2      byte&0xF0       0x40           \b,  32 kbps
  810. >2      byte&0xF0       0x50           \b,  40 kbps
  811. >2      byte&0xF0       0x60           \b,  48 kbps
  812. >2      byte&0xF0       0x70           \b,  56 kbps
  813. >2      byte&0xF0       0x80           \b,  64 kbps
  814. >2      byte&0xF0       0x90           \b,  80 kbps
  815. >2      byte&0xF0       0xA0           \b,  96 kbps
  816. >2      byte&0xF0       0xB0           \b, 112 kbps
  817. >2      byte&0xF0       0xC0           \b, 128 kbps
  818. >2      byte&0xF0       0xD0           \b, 144 kbps
  819. >2      byte&0xF0       0xE0           \b, 160 kbps
  820. # timing
  821. >2      byte&0x0C       0x00           \b, 11.025 kHz
  822. >2      byte&0x0C       0x04           \b, 12 kHz
  823. >2      byte&0x0C       0x08           \b, 8 kHz
  824. # channels/options
  825. >3      byte&0xC0       0x00           \b, Stereo
  826. >3      byte&0xC0       0x40           \b, JntStereo
  827. >3      byte&0xC0       0x80           \b, 2x Monaural
  828. >3      byte&0xC0       0xC0           \b, Monaural
  829. #>1     byte            ^0x01          \b, Data Verify
  830. #>2     byte            &0x02          \b, Packet Pad
  831. #>2     byte            &0x01          \b, Custom Flag
  832. #>3     byte            &0x08          \b, Copyrighted
  833. #>3     byte            &0x04          \b, Original Source
  834. #>3     byte&0x03       1              \b, NR: 50/15 ms
  835. #>3     byte&0x03       3              \b, NR: CCIT J.17
  836.  
  837. # AAC (aka MPEG-2 NBC audio) and MPEG-4 audio
  838.  
  839. # Stored AAC streams (instead of the MP4 format)
  840. 0       string          ADIF           MPEG ADIF, AAC
  841. !:mime    audio/x-hx-aac-adif
  842. >4      byte            &0x80
  843. >>13    byte            &0x10          \b, VBR
  844. >>13    byte            ^0x10          \b, CBR
  845. >>16    byte&0x1E       0x02           \b, single stream
  846. >>16    byte&0x1E       0x04           \b, 2 streams
  847. >>16    byte&0x1E       0x06           \b, 3 streams
  848. >>16    byte            &0x08          \b, 4 or more streams
  849. >>16    byte            &0x10          \b, 8 or more streams
  850. >>4    byte            &0x80          \b, Copyrighted
  851. >>13   byte            &0x40          \b, Original Source
  852. >>13   byte            &0x20          \b, Home Flag
  853. >4      byte            ^0x80
  854. >>4     byte            &0x10          \b, VBR
  855. >>4     byte            ^0x10          \b, CBR
  856. >>7     byte&0x1E       0x02           \b, single stream
  857. >>7     byte&0x1E       0x04           \b, 2 streams
  858. >>7     byte&0x1E       0x06           \b, 3 streams
  859. >>7     byte            &0x08          \b, 4 or more streams
  860. >>7     byte            &0x10          \b, 8 or more streams
  861. >>4    byte            &0x40          \b, Original Stream(s)
  862. >>4    byte            &0x20          \b, Home Source
  863.  
  864. # Live or stored single AAC stream (used with MPEG-2 systems)
  865. 0       beshort&0xFFF6  0xFFF0         MPEG ADTS, AAC
  866. !:mime    audio/x-hx-aac-adts
  867. >1      byte            &0x08          \b, v2
  868. >1      byte            ^0x08          \b, v4
  869. # profile
  870. >>2     byte            &0xC0          \b LTP
  871. >2      byte&0xc0       0x00           \b Main
  872. >2      byte&0xc0       0x40           \b LC
  873. >2      byte&0xc0       0x80           \b SSR
  874. # timing
  875. >2      byte&0x3c       0x00           \b, 96 kHz
  876. >2      byte&0x3c       0x04           \b, 88.2 kHz
  877. >2      byte&0x3c       0x08           \b, 64 kHz
  878. >2      byte&0x3c       0x0c           \b, 48 kHz
  879. >2      byte&0x3c       0x10           \b, 44.1 kHz
  880. >2      byte&0x3c       0x14           \b, 32 kHz
  881. >2      byte&0x3c       0x18           \b, 24 kHz
  882. >2      byte&0x3c       0x1c           \b, 22.05 kHz
  883. >2      byte&0x3c       0x20           \b, 16 kHz
  884. >2      byte&0x3c       0x24           \b, 12 kHz
  885. >2      byte&0x3c       0x28           \b, 11.025 kHz
  886. >2      byte&0x3c       0x2c           \b, 8 kHz
  887. # channels
  888. >2      beshort&0x01c0  0x0040         \b, monaural
  889. >2      beshort&0x01c0  0x0080         \b, stereo
  890. >2      beshort&0x01c0  0x00c0         \b, stereo + center
  891. >2      beshort&0x01c0  0x0100         \b, stereo+center+LFE
  892. >2      beshort&0x01c0  0x0140         \b, surround
  893. >2      beshort&0x01c0  0x0180         \b, surround + LFE
  894. >2      beshort         &0x01C0        \b, surround + side
  895. #>1     byte            ^0x01           \b, Data Verify
  896. #>2     byte            &0x02           \b, Custom Flag
  897. #>3     byte            &0x20           \b, Original Stream
  898. #>3     byte            &0x10           \b, Home Source
  899. #>3     byte            &0x08           \b, Copyrighted
  900.  
  901. # Live MPEG-4 audio streams (instead of RTP FlexMux)
  902. 0       beshort&0xFFE0  0x56E0         MPEG-4 LOAS
  903. !:mime    audio/x-mp4a-latm
  904. #>1     beshort&0x1FFF  x              \b, %u byte packet
  905. >3      byte&0xE0       0x40
  906. >>4     byte&0x3C       0x04           \b, single stream
  907. >>4     byte&0x3C       0x08           \b, 2 streams
  908. >>4     byte&0x3C       0x0C           \b, 3 streams
  909. >>4     byte            &0x08          \b, 4 or more streams
  910. >>4     byte            &0x20          \b, 8 or more streams
  911. >3      byte&0xC0       0
  912. >>4     byte&0x78       0x08           \b, single stream
  913. >>4     byte&0x78       0x10           \b, 2 streams
  914. >>4     byte&0x78       0x18           \b, 3 streams
  915. >>4     byte            &0x20          \b, 4 or more streams
  916. >>4     byte            &0x40          \b, 8 or more streams
  917. # This magic isn't strong enough (matches plausible ISO-8859-1 text)
  918. #0       beshort         0x4DE1         MPEG-4 LO-EP audio stream
  919. #!:mime    audio/x-mp4a-latm
  920.  
  921. # FLI animation format
  922. 4    leshort        0xAF11            FLI file
  923. !:mime    video/x-fli
  924. >6    leshort        x            - %d frames,
  925. >8    leshort        x            width=%d pixels,
  926. >10    leshort        x            height=%d pixels,
  927. >12    leshort        x            depth=%d,
  928. >16    leshort        x            ticks/frame=%d
  929. # FLC animation format
  930. 4    leshort        0xAF12            FLC file
  931. !:mime    video/x-flc
  932. >6    leshort        x            - %d frames
  933. >8    leshort        x            width=%d pixels,
  934. >10    leshort        x            height=%d pixels,
  935. >12    leshort        x            depth=%d,
  936. >16    leshort        x            ticks/frame=%d
  937.  
  938. # DL animation format
  939. # XXX - collision with most `mips' magic
  940. #
  941. # I couldn't find a real magic number for these, however, this
  942. # -appears- to work.  Note that it might catch other files, too, so be
  943. # careful!
  944. #
  945. # Note that title and author appear in the two 20-byte chunks
  946. # at decimal offsets 2 and 22, respectively, but they are XOR'ed with
  947. # 255 (hex FF)!  The DL format is really bad.
  948. #
  949. #0    byte    1    DL version 1, medium format (160x100, 4 images/screen)
  950. #!:mime    video/x-unknown
  951. #>42    byte    x    - %d screens,
  952. #>43    byte    x    %d commands
  953. #0    byte    2    DL version 2
  954. #!:mime    video/x-unknown
  955. #>1    byte    1    - large format (320x200,1 image/screen),
  956. #>1    byte    2    - medium format (160x100,4 images/screen),
  957. #>1    byte    >2    - unknown format,
  958. #>42    byte    x    %d screens,
  959. #>43    byte    x    %d commands
  960. # Based on empirical evidence, DL version 3 have several nulls following the
  961. # \003.  Most of them start with non-null values at hex offset 0x34 or so.
  962. #0    string    \3\0\0\0\0\0\0\0\0\0\0\0    DL version 3
  963.  
  964. # iso 13818 transport stream
  965. #
  966. # from Oskar Schirmer <schirmer@scara.com> Feb 3, 2001 (ISO 13818.1)
  967. # (the following is a little bit restrictive and works fine for a stream
  968. #  that starts with PAT properly. it won't work for stream data, that is
  969. #  cut from an input device data right in the middle, but this shouldn't
  970. #  disturb)
  971. # syncbyte      8 bit    0x47
  972. # error_ind     1 bit    -
  973. # payload_start 1 bit    1
  974. # priority      1 bit    -
  975. # PID          13 bit    0x0000
  976. # scrambling    2 bit    -
  977. # adaptfld_ctrl 2 bit    1 or 3
  978. # conti_count   4 bit    0
  979. 0    belong&0xFF5FFF1F    0x47400010    MPEG transport stream data
  980. >188    byte            !0x47        CORRUPTED
  981.  
  982. # DIF digital video file format <mpruett@sgi.com>
  983. 0    belong&0xffffff00    0x1f070000      DIF
  984. >4    byte            &0x01        (DVCPRO) movie file
  985. >4    byte            ^0x01        (DV) movie file
  986. >3    byte            &0x80        (PAL)
  987. >3    byte            ^0x80        (NTSC)
  988.  
  989. # Microsoft Advanced Streaming Format (ASF) <mpruett@sgi.com>
  990. 0    belong            0x3026b275    Microsoft ASF
  991. !:mime    video/x-ms-asf
  992.  
  993. # MNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
  994. 0    string            \x8aMNG        MNG video data,
  995. !:mime    video/x-mng
  996. >4    belong            !0x0d0a1a0a    CORRUPTED,
  997. >4    belong            0x0d0a1a0a
  998. >>16    belong    x                %ld x
  999. >>20    belong    x                %ld
  1000.  
  1001. # JNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
  1002. 0    string            \x8bJNG        JNG video data,
  1003. !:mime    video/x-jng
  1004. >4    belong            !0x0d0a1a0a    CORRUPTED,
  1005. >4    belong            0x0d0a1a0a
  1006. >>16    belong    x                %ld x
  1007. >>20    belong    x                %ld
  1008.  
  1009. # Vivo video (Wolfram Kleff)
  1010. 3    string        \x0D\x0AVersion:Vivo    Vivo video data
  1011.  
  1012. # VRML (Virtual Reality Modelling Language)
  1013. 0       string/b        #VRML\ V1.0\ ascii    VRML 1 file
  1014. !:mime    model/vrml
  1015. 0    string/b    #VRML\ V2.0\ utf8    ISO/IEC 14772 VRML 97 file
  1016. !:mime    model/vrml
  1017.  
  1018. #---------------------------------------------------------------------------
  1019. # HVQM4: compressed movie format designed by Hudson for Nintendo GameCube
  1020. # From Mark Sheppard <msheppard@climax.co.uk>, 2002-10-03
  1021. #
  1022. 0    string        HVQM4        %s
  1023. >6    string        >\0        v%s
  1024. >0    byte        x        GameCube movie,
  1025. >0x34    ubeshort    x        %d x
  1026. >0x36    ubeshort    x        %d,
  1027. >0x26    ubeshort    x        %d┬╡s,
  1028. >0x42    ubeshort    0        no audio
  1029. >0x42    ubeshort    >0        %dHz audio
  1030.  
  1031. # From: "Stefan A. Haubenthal" <polluks@web.de>
  1032. 0    string        DVDVIDEO-VTS    Video title set,
  1033. >0x21    byte        x        v%x
  1034. 0    string        DVDVIDEO-VMG    Video manager,
  1035. >0x21    byte        x        v%x
  1036.  
  1037. # From: Behan Webster <behanw@websterwood.com>
  1038. # NuppelVideo used by Mythtv (*.nuv)
  1039. # Note: there are two identical stanzas here differing only in the
  1040. # initial string matched. It used to be done with a regex, but we're
  1041. # trying to get rid of those.
  1042. 0    string        NuppelVideo    MythTV NuppelVideo
  1043. >12    string        x        v%s
  1044. >20    lelong        x        (%d
  1045. >24    lelong        x        \bx%d),
  1046. >36    string        P        \bprogressive,
  1047. >36    string        I        \binterlaced,
  1048. >40    ledouble    x        \baspect:%.2f,
  1049. >48    ledouble    x        \bfps:%.2f
  1050. 0    string        MythTV        MythTV NuppelVideo
  1051. >12    string        x        v%s
  1052. >20    lelong        x        (%d
  1053. >24    lelong        x        \bx%d),
  1054. >36    string        P        \bprogressive,
  1055. >36    string        I        \binterlaced,
  1056. >40    ledouble    x        \baspect:%.2f,
  1057. >48    ledouble    x        \bfps:%.2f
  1058.  
  1059. #                        MPEG file
  1060. # MPEG sequences
  1061. # FIXME: This section is from the old magic.mime file and needs integrating with the rest
  1062. 0       belong             0x000001BA
  1063. >4      byte               &0x40
  1064. !:mime    video/mp2p
  1065. >4      byte               ^0x40
  1066. !:mime    video/mpeg
  1067. 0       belong             0x000001BB
  1068. !:mime    video/mpeg
  1069. 0       belong             0x000001B0
  1070. !:mime    video/mp4v-es
  1071. 0       belong             0x000001B5
  1072. !:mime    video/mp4v-es
  1073. 0       belong             0x000001B3
  1074. !:mime    video/mpv
  1075. 0       belong&0xFF5FFF1F  0x47400010
  1076. !:mime    video/mp2t
  1077. 0       belong             0x00000001
  1078. >4      byte&0x1F       0x07
  1079. !:mime    video/h264
  1080.  
  1081. #------------------------------------------------------------------------------
  1082. # apl:  file(1) magic for APL (see also "pdp" and "vax" for other APL
  1083. #       workspaces)
  1084. #
  1085. 0    long        0100554        APL workspace (Ken's original?)
  1086. #------------------------------------------------------------------------------
  1087. # apple:  file(1) magic for Apple file formats
  1088. #
  1089. 0    search/1    FiLeStArTfIlEsTaRt    binscii (apple ][) text
  1090. 0    string        \x0aGL            Binary II (apple ][) data
  1091. 0    string        \x76\xff        Squeezed (apple ][) data
  1092. 0    string        NuFile            NuFile archive (apple ][) data
  1093. 0    string        N\xf5F\xe9l\xe5        NuFile archive (apple ][) data
  1094. 0    belong        0x00051600        AppleSingle encoded Macintosh file
  1095. 0    belong        0x00051607        AppleDouble encoded Macintosh file
  1096.  
  1097. # Type: Apple Emulator 2IMG format
  1098. # From: Radek Vokal <rvokal@redhat.com>
  1099. 0    string        2IMG    Apple ][ 2IMG Disk Image
  1100. >4    string        XGS!    \b, XGS
  1101. >4    string        CTKG    \b, Catakig
  1102. >4    string        ShIm    \b, Sheppy's ImageMaker
  1103. >4    string        WOOF    \b, Sweet 16
  1104. >4    string        B2TR    \b, Bernie ][ the Rescue
  1105. >4    string        !nfc    \b, ASIMOV2
  1106. >4    string        x    \b, Unknown Format
  1107. >0xc    byte        00    \b, DOS 3.3 sector order
  1108. >>0x10    byte        00    \b, Volume 254
  1109. >>0x10    byte&0x7f    x    \b, Volume %u
  1110. >0xc    byte        01    \b, ProDOS sector order
  1111. >>0x14    short        x    \b, %u Blocks
  1112. >0xc    byte        02    \b, NIB data
  1113.  
  1114. # magic for Newton PDA package formats
  1115. # from Ruda Moura <ruda@helllabs.org>
  1116. 0    string    package0    Newton package, NOS 1.x,
  1117. >12    belong    &0x80000000    AutoRemove,
  1118. >12    belong    &0x40000000    CopyProtect,
  1119. >12    belong    &0x10000000    NoCompression,
  1120. >12    belong    &0x04000000    Relocation,
  1121. >12    belong    &0x02000000    UseFasterCompression,
  1122. >16    belong    x        version %d
  1123.  
  1124. 0    string    package1    Newton package, NOS 2.x,
  1125. >12    belong    &0x80000000    AutoRemove,
  1126. >12    belong    &0x40000000    CopyProtect,
  1127. >12    belong    &0x10000000    NoCompression,
  1128. >12    belong    &0x04000000    Relocation,
  1129. >12    belong    &0x02000000    UseFasterCompression,
  1130. >16    belong    x        version %d
  1131.  
  1132. 0    string    package4    Newton package,
  1133. >8    byte    8        NOS 1.x,
  1134. >8    byte    9        NOS 2.x,
  1135. >12    belong    &0x80000000    AutoRemove,
  1136. >12    belong    &0x40000000    CopyProtect,
  1137. >12    belong    &0x10000000    NoCompression,
  1138.  
  1139. # The following entries for the Apple II are for files that have
  1140. # been transferred as raw binary data from an Apple, without having
  1141. # been encapsulated by any of the above archivers.
  1142. #
  1143. # In general, Apple II formats are hard to identify because Apple DOS
  1144. # and especially Apple ProDOS have strong typing in the file system and
  1145. # therefore programmers never felt much need to include type information
  1146. # in the files themselves.
  1147. #
  1148. # Eric Fischer <enf@pobox.com>
  1149.  
  1150. # AppleWorks word processor:
  1151. #
  1152. # This matches the standard tab stops for an AppleWorks file, but if
  1153. # a file has a tab stop set in the first four columns this will fail.
  1154. #
  1155. # The "O" is really the magic number, but that's so common that it's
  1156. # necessary to check the tab stops that follow it to avoid false positives.
  1157.  
  1158. 4       string          O====   AppleWorks word processor data
  1159. >85     byte&0x01       >0      \b, zoomed
  1160. >90     byte&0x01       >0      \b, paginated
  1161. >92     byte&0x01       >0      \b, with mail merge
  1162. #>91    byte            x       \b, left margin %d
  1163.  
  1164. # AppleWorks database:
  1165. #
  1166. # This isn't really a magic number, but it's the closest thing to one
  1167. # that I could find.  The 1 and 2 really mean "order in which you defined
  1168. # categories" and "left to right, top to bottom," respectively; the D and R
  1169. # mean that the cursor should move either down or right when you press Return.
  1170.  
  1171. #30    string        \x01D    AppleWorks database data
  1172. #30    string        \x02D    AppleWorks database data
  1173. #30    string        \x01R    AppleWorks database data
  1174. #30    string        \x02R    AppleWorks database data
  1175.  
  1176. # AppleWorks spreadsheet:
  1177. #
  1178. # Likewise, this isn't really meant as a magic number.  The R or C means
  1179. # row- or column-order recalculation; the A or M means automatic or manual
  1180. # recalculation.
  1181.  
  1182. #131    string        RA    AppleWorks spreadsheet data
  1183. #131    string        RM    AppleWorks spreadsheet data
  1184. #131    string        CA    AppleWorks spreadsheet data
  1185. #131    string        CM    AppleWorks spreadsheet data
  1186.  
  1187. # Applesoft BASIC:
  1188. #
  1189. # This is incredibly sloppy, but will be true if the program was
  1190. # written at its usual memory location of 2048 and its first line
  1191. # number is less than 256.  Yuck.
  1192.  
  1193. 0       belong&0xff00ff 0x80000 Applesoft BASIC program data
  1194. #>2     leshort         x       \b, first line number %d
  1195.  
  1196. # ORCA/EZ assembler:
  1197. # This will not identify ORCA/M source files, since those have
  1198. # some sort of date code instead of the two zero bytes at 6 and 7
  1199. # XXX Conflicts with ELF
  1200. #4       belong&0xff00ffff       0x01000000      ORCA/EZ assembler source data
  1201. #>5      byte                    x               \b, build number %d
  1202.  
  1203. # Broderbund Fantavision
  1204. #
  1205. # I don't know what these values really mean, but they seem to recur.
  1206. # Will they cause too many conflicts?
  1207.  
  1208. # Probably :-)
  1209. #2    belong&0xFF00FF        0x040008    Fantavision movie data
  1210.  
  1211. # Some attempts at images.
  1212. #
  1213. # These are actually just bit-for-bit dumps of the frame buffer, so
  1214. # there's really no reasonably way to distinguish them except for their
  1215. # address (if preserved) -- 8192 or 16384 -- and their length -- 8192
  1216. # or, occasionally, 8184.
  1217. #
  1218. # Nevertheless this will manage to catch a lot of images that happen
  1219. # to have a solid-colored line at the bottom of the screen.
  1220.  
  1221. # GRR: Magic too weak
  1222. #8144    string    \x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F    Apple II image with white background
  1223. #8144    string    \x55\x2A\x55\x2A\x55\x2A\x55\x2A    Apple II image with purple background
  1224. #8144    string    \x2A\x55\x2A\x55\x2A\x55\x2A\x55    Apple II image with green background
  1225. #8144    string    \xD5\xAA\xD5\xAA\xD5\xAA\xD5\xAA    Apple II image with blue background
  1226. #8144    string    \xAA\xD5\xAA\xD5\xAA\xD5\xAA\xD5    Apple II image with orange background
  1227.  
  1228. # Beagle Bros. Apple Mechanic fonts
  1229.  
  1230. 0    belong&0xFF00FFFF    0x6400D000    Apple Mechanic font
  1231.  
  1232. # Apple Universal Disk Image Format (UDIF) - dmg files.
  1233. # From Johan Gade.
  1234. # These entries are disabled for now until we fix the following issues.
  1235. #
  1236. # Note there might be some problems with the "VAX COFF executable" 
  1237. # entry. Note this entry should be placed before the mac filesystem section, 
  1238. # particularly the "Apple Partition data" entry.
  1239. #
  1240. # The intended meaning of these tests is, that the file is only of the 
  1241. # specified type if both of the lines are correct - i.e. if the first
  1242. # line matches and the second doesn't then it is not of that type.
  1243. #
  1244. #0    long    0x7801730d
  1245. #>4    long    0x62626060    UDIF read-only zlib-compressed image (UDZO)
  1246. #
  1247. # Note that this entry is recognized correctly by the "Apple Partition 
  1248. # data" entry - however since this entry is more specific - this
  1249. # information seems to be more useful.
  1250. #0    long    0x45520200
  1251. #>0x410    string    disk\ image    UDIF read/write image (UDRW)
  1252.  
  1253. # From: Toby Peterson <toby@apple.com>
  1254. 0    string    bplist00    Apple binary property list
  1255.  
  1256. # Apple binary property list (bplist)
  1257. #  Assumes version bytes are hex.
  1258. #  Provides content hints for version 0 files. Assumes that the root
  1259. #  object is the first object (true for CoreFoundation implementation).
  1260. # From: David Remahl <dremahl@apple.com>
  1261. 0        string    bplist
  1262. >6        byte    x    \bCoreFoundation binary property list data, version 0x%c
  1263. >>7        byte    x    \b%c
  1264. >6        string        00        \b
  1265. >>8        byte&0xF0    0x00    \b
  1266. >>>8    byte&0x0F    0x00    \b, root type: null
  1267. >>>8    byte&0x0F    0x08    \b, root type: false boolean
  1268. >>>8    byte&0x0F    0x09    \b, root type: true boolean
  1269. >>8        byte&0xF0    0x10    \b, root type: integer
  1270. >>8        byte&0xF0    0x20    \b, root type: real
  1271. >>8        byte&0xF0    0x30    \b, root type: date
  1272. >>8        byte&0xF0    0x40    \b, root type: data
  1273. >>8        byte&0xF0    0x50    \b, root type: ascii string
  1274. >>8        byte&0xF0    0x60    \b, root type: unicode string
  1275. >>8        byte&0xF0    0x80    \b, root type: uid (CORRUPT)
  1276. >>8        byte&0xF0    0xa0    \b, root type: array
  1277. >>8        byte&0xF0    0xd0    \b, root type: dictionary
  1278.  
  1279. # Apple/NeXT typedstream data
  1280. #  Serialization format used by NeXT and Apple for various
  1281. #  purposes in YellowStep/Cocoa, including some nib files.
  1282. # From: David Remahl <dremahl@apple.com>
  1283. 2        string        typedstream    NeXT/Apple typedstream data, big endian
  1284. >0        byte        x        \b, version %hhd
  1285. >0        byte        <5        \b
  1286. >>13    byte        0x81    \b
  1287. >>>14    ubeshort    x        \b, system %hd
  1288. 2        string        streamtyped NeXT/Apple typedstream data, little endian
  1289. >0        byte        x        \b, version %hhd
  1290. >0        byte        <5        \b
  1291. >>13    byte        0x81    \b
  1292. >>>14    uleshort    x        \b, system %hd
  1293.  
  1294. #------------------------------------------------------------------------------
  1295. # CAF: Apple CoreAudio File Format
  1296. #
  1297. # Container format for high-end audio purposes.
  1298. # From: David Remahl <dremahl@apple.com>
  1299. #
  1300. 0    string        caff        CoreAudio Format audio file
  1301. >4    beshort        <10        version %d
  1302. >6    beshort        x
  1303.  
  1304.  
  1305. #------------------------------------------------------------------------------
  1306. # Keychain database files
  1307. 0    string        kych        Mac OS X Keychain File
  1308.  
  1309. #------------------------------------------------------------------------------
  1310. # Code Signing related file types
  1311. 0    belong        0xfade0c00    Mac OS X Code Requirement
  1312. >8    belong        1            (opExpr)
  1313. >4    belong        x            - %d bytes
  1314.  
  1315. 0    belong        0xfade0c01    Mac OS X Code Requirement Set
  1316. >8    belong        >1            containing %d items
  1317. >4    belong        x            - %d bytes
  1318.  
  1319. 0    belong        0xfade0c02    Mac OS X Code Directory
  1320. >8    belong        x            version %x
  1321. >12    belong        >0            flags 0x%x
  1322. >4    belong        x            - %d bytes
  1323.  
  1324. 0    belong        0xfade0cc0    Mac OS X Detached Code Signature (non-executable)
  1325. >4    belong        x            - %d bytes
  1326.  
  1327. 0    belong        0xfade0cc1    Mac OS X Detached Code Signature
  1328. >8    belong        >1            (%d elements)
  1329. >4    belong        x            - %d bytes
  1330.  
  1331. # From: "Nelson A. de Oliveira" <naoliv@gmail.com>
  1332. # .vdi
  1333. 4    string innotek\ VirtualBox\ Disk\ Image %s
  1334.  
  1335. #------------------------------------------------------------------------------
  1336. # applix:  file(1) magic for Applixware
  1337. # From: Peter Soos <sp@osb.hu>
  1338. #
  1339. 0    string        *BEGIN        Applixware
  1340. >7    string        WORDS            Words Document
  1341. >7    string        GRAPHICS        Graphic
  1342. >7    string        RASTER            Bitmap
  1343. >7    string        SPREADSHEETS        Spreadsheet
  1344. >7    string        MACRO            Macro
  1345. >7    string        BUILDER            Builder Object
  1346. #------------------------------------------------------------------------------
  1347. # archive:  file(1) magic for archive formats (see also "msdos" for self-
  1348. #           extracting compressed archives)
  1349. #
  1350. # cpio, ar, arc, arj, hpack, lha/lharc, rar, squish, uc2, zip, zoo, etc.
  1351. # pre-POSIX "tar" archives are handled in the C code.
  1352.  
  1353. # POSIX tar archives
  1354. 257    string        ustar\0        POSIX tar archive
  1355. !:mime    application/x-tar # encoding: posix
  1356. 257    string        ustar\040\040\0    GNU tar archive
  1357. !:mime    application/x-tar # encoding: gnu
  1358.  
  1359. # cpio archives
  1360. #
  1361. # Yes, the top two "cpio archive" formats *are* supposed to just be "short".
  1362. # The idea is to indicate archives produced on machines with the same
  1363. # byte order as the machine running "file" with "cpio archive", and
  1364. # to indicate archives produced on machines with the opposite byte order
  1365. # from the machine running "file" with "byte-swapped cpio archive".
  1366. #
  1367. # The SVR4 "cpio(4)" hints that there are additional formats, but they
  1368. # are defined as "short"s; I think all the new formats are
  1369. # character-header formats and thus are strings, not numbers.
  1370. 0    short        070707        cpio archive
  1371. !:mime    application/x-cpio
  1372. 0    short        0143561        byte-swapped cpio archive
  1373. !:mime    application/x-cpio # encoding: swapped
  1374. 0    string        070707        ASCII cpio archive (pre-SVR4 or odc)
  1375. 0    string        070701        ASCII cpio archive (SVR4 with no CRC)
  1376. 0    string        070702        ASCII cpio archive (SVR4 with CRC)
  1377.  
  1378. # Debian package (needs to go before regular portable archives)
  1379. #
  1380. 0    string        =!<arch>\ndebian
  1381. !:mime    application/x-debian-package
  1382. >8    string        debian-split    part of multipart Debian package
  1383. >8    string        debian-binary    Debian binary package
  1384. >8    string        !debian
  1385. >68    string        >\0        (format %s)
  1386. # These next two lines do not work, because a bzip2 Debian archive
  1387. # still uses gzip for the control.tar (first in the archive).  Only
  1388. # data.tar varies, and the location of its filename varies too.
  1389. # file/libmagic does not current have support for ascii-string based
  1390. # (offsets) as of 2005-09-15.
  1391. #>81    string        bz2        \b, uses bzip2 compression
  1392. #>84    string        gz        \b, uses gzip compression
  1393. #>136    ledate        x        created: %s
  1394.  
  1395. # other archives
  1396. 0    long        0177555        very old archive
  1397. 0    short        0177555        very old PDP-11 archive
  1398. 0    long        0177545        old archive
  1399. 0    short        0177545        old PDP-11 archive
  1400. 0    long        0100554        apl workspace
  1401. 0    string        =<ar>        archive
  1402. !:mime    application/x-archive
  1403.  
  1404. # MIPS archive (needs to go before regular portable archives)
  1405. #
  1406. 0    string    =!<arch>\n__________E    MIPS archive
  1407. >20    string    U            with MIPS Ucode members
  1408. >21    string    L            with MIPSEL members
  1409. >21    string    B            with MIPSEB members
  1410. >19    string    L            and an EL hash table
  1411. >19    string    B            and an EB hash table
  1412. >22    string    X            -- out of date
  1413.  
  1414. 0    search/1    -h-        Software Tools format archive text
  1415.  
  1416. #
  1417. # XXX - why are there multiple <ar> thingies?  Note that 0x213c6172 is
  1418. # "!<ar", so, for new-style (4.xBSD/SVR2andup) archives, we have:
  1419. #
  1420. # 0    string        =!<arch>        current ar archive
  1421. # 0    long        0x213c6172    archive file
  1422. #
  1423. # and for SVR1 archives, we have:
  1424. #
  1425. # 0    string        \<ar>        System V Release 1 ar archive
  1426. # 0    string        =<ar>        archive
  1427. #
  1428. # XXX - did Aegis really store shared libraries, breakpointed modules,
  1429. # and absolute code program modules in the same format as new-style
  1430. # "ar" archives?
  1431. #
  1432. 0    string        =!<arch>        current ar archive
  1433. !:mime    application/x-archive
  1434. >8    string        __.SYMDEF    random library
  1435. >0    belong        =65538        - pre SR9.5
  1436. >0    belong        =65539        - post SR9.5
  1437. >0    beshort        2        - object archive
  1438. >0    beshort        3        - shared library module
  1439. >0    beshort        4        - debug break-pointed module
  1440. >0    beshort        5        - absolute code program module
  1441. 0    string        \<ar>        System V Release 1 ar archive
  1442. 0    string        =<ar>        archive
  1443. #
  1444. # XXX - from "vax", which appears to collect a bunch of byte-swapped
  1445. # thingies, to help you recognize VAX files on big-endian machines;
  1446. # with "leshort", "lelong", and "string", that's no longer necessary....
  1447. #
  1448. 0    belong        0x65ff0000    VAX 3.0 archive
  1449. 0    belong        0x3c61723e    VAX 5.0 archive
  1450. #
  1451. 0    long        0x213c6172    archive file
  1452. 0    lelong        0177555        very old VAX archive
  1453. 0    leshort        0177555        very old PDP-11 archive
  1454. #
  1455. # XXX - "pdp" claims that 0177545 can have an __.SYMDEF member and thus
  1456. # be a random library (it said 0xff65 rather than 0177545).
  1457. #
  1458. 0    lelong        0177545        old VAX archive
  1459. >8    string        __.SYMDEF    random library
  1460. 0    leshort        0177545        old PDP-11 archive
  1461. >8    string        __.SYMDEF    random library
  1462. #
  1463. # From "pdp" (but why a 4-byte quantity?)
  1464. #
  1465. 0    lelong        0x39bed        PDP-11 old archive
  1466. 0    lelong        0x39bee        PDP-11 4.0 archive
  1467.  
  1468. # ARC archiver, from Daniel Quinlan (quinlan@yggdrasil.com)
  1469. #
  1470. # The first byte is the magic (0x1a), byte 2 is the compression type for
  1471. # the first file (0x01 through 0x09), and bytes 3 to 15 are the MS-DOS
  1472. # filename of the first file (null terminated).  Since some types collide
  1473. # we only test some types on basis of frequency: 0x08 (83%), 0x09 (5%),
  1474. # 0x02 (5%), 0x03 (3%), 0x04 (2%), 0x06 (2%).  0x01 collides with terminfo.
  1475. 0    lelong&0x8080ffff    0x0000081a    ARC archive data, dynamic LZW
  1476. !:mime    application/x-arc
  1477. 0    lelong&0x8080ffff    0x0000091a    ARC archive data, squashed
  1478. !:mime    application/x-arc
  1479. 0    lelong&0x8080ffff    0x0000021a    ARC archive data, uncompressed
  1480. !:mime    application/x-arc
  1481. 0    lelong&0x8080ffff    0x0000031a    ARC archive data, packed
  1482. !:mime    application/x-arc
  1483. 0    lelong&0x8080ffff    0x0000041a    ARC archive data, squeezed
  1484. !:mime    application/x-arc
  1485. 0    lelong&0x8080ffff    0x0000061a    ARC archive data, crunched
  1486. !:mime    application/x-arc
  1487. # [JW] stuff taken from idarc, obviously ARC successors:
  1488. 0    lelong&0x8080ffff    0x00000a1a    PAK archive data
  1489. !:mime    application/x-arc
  1490. 0    lelong&0x8080ffff    0x0000141a    ARC+ archive data
  1491. !:mime    application/x-arc
  1492. 0    lelong&0x8080ffff    0x0000481a    HYP archive data
  1493. !:mime    application/x-arc
  1494.  
  1495. # Acorn archive formats (Disaster prone simpleton, m91dps@ecs.ox.ac.uk)
  1496. # I can't create either SPARK or ArcFS archives so I have not tested this stuff
  1497. # [GRR:  the original entries collide with ARC, above; replaced with combined
  1498. #  version (not tested)]
  1499. #0    byte        0x1a        RISC OS archive (spark format)
  1500. 0    string        \032archive    RISC OS archive (ArcFS format)
  1501. 0       string          Archive\000     RISC OS archive (ArcFS format)
  1502.  
  1503. # All these were taken from idarc, many could not be verified. Unfortunately,
  1504. # there were many low-quality sigs, i.e. easy to trigger false positives.
  1505. # Please notify me of any real-world fishy/ambiguous signatures and I'll try
  1506. # to get my hands on the actual archiver and see if I find something better. [JW]
  1507. # probably many can be enhanced by finding some 0-byte or control char near the start
  1508.  
  1509. # idarc calls this Crush/Uncompressed... *shrug*
  1510. 0    string    CRUSH Crush archive data
  1511. # Squeeze It (.sqz)
  1512. 0    string    HLSQZ Squeeze It archive data
  1513. # SQWEZ
  1514. 0    string    SQWEZ SQWEZ archive data
  1515. # HPack (.hpk)
  1516. 0    string    HPAK HPack archive data
  1517. # HAP
  1518. 0    string    \x91\x33HF HAP archive data
  1519. # MD/MDCD
  1520. 0    string    MDmd MDCD archive data
  1521. # LIM
  1522. 0    string    LIM\x1a LIM archive data
  1523. # SAR
  1524. 3    string    LH5 SAR archive data
  1525. # BSArc/BS2
  1526. 0    string    \212\3SB \0 BSArc/BS2 archive data
  1527. # MAR
  1528. 2    string    =-ah MAR archive data
  1529. # ACB
  1530. 0    belong&0x00f800ff    0x00800000 ACB archive data
  1531. # CPZ
  1532. # TODO, this is what idarc says: 0    string    \0\0\0 CPZ archive data
  1533. # JRC
  1534. 0    string    JRchive JRC archive data
  1535. # Quantum
  1536. 0    string    DS\0 Quantum archive data
  1537. # ReSOF
  1538. 0    string    PK\3\6 ReSOF archive data
  1539. # QuArk
  1540. 0    string    7\4 QuArk archive data
  1541. # YAC
  1542. 14    string    YC YAC archive data
  1543. # X1
  1544. 0    string    X1 X1 archive data
  1545. 0    string    XhDr X1 archive data
  1546. # CDC Codec (.dqt)
  1547. 0    belong&0xffffe000    0x76ff2000 CDC Codec archive data
  1548. # AMGC
  1549. 0    string    \xad6" AMGC archive data
  1550. # NuLIB
  1551. 0    string    N├╡F├⌐l├Ñ NuLIB archive data
  1552. # PakLeo
  1553. 0    string    LEOLZW PAKLeo archive data
  1554. # ChArc
  1555. 0    string    SChF ChArc archive data
  1556. # PSA
  1557. 0    string    PSA PSA archive data
  1558. # CrossePAC
  1559. 0    string    DSIGDCC CrossePAC archive data
  1560. # Freeze
  1561. 0    string    \x1f\x9f\x4a\x10\x0a Freeze archive data
  1562. # KBoom
  1563. 0    string    ┬¿MP┬¿ KBoom archive data
  1564. # NSQ, must go after CDC Codec
  1565. 0    string    \x76\xff NSQ archive data
  1566. # DPA
  1567. 0    string    Dirk\ Paehl DPA archive data
  1568. # BA
  1569. # TODO: idarc says "bytes 0-2 == bytes 3-5"
  1570. # TTComp
  1571. 0    string    \0\6 TTComp archive data
  1572. # ESP, could this conflict with Easy Software Products' (e.g.ESP ghostscript) documentation?
  1573. 0    string    ESP ESP archive data
  1574. # ZPack
  1575. 0    string    \1ZPK\1 ZPack archive data
  1576. # Sky
  1577. 0    string    \xbc\x40 Sky archive data
  1578. # UFA
  1579. 0    string    UFA UFA archive data
  1580. # Dry
  1581. 0    string    =-H2O DRY archive data
  1582. # FoxSQZ
  1583. 0    string    FOXSQZ FoxSQZ archive data
  1584. # AR7
  1585. 0    string    ,AR7 AR7 archive data
  1586. # PPMZ
  1587. 0    string    PPMZ PPMZ archive data
  1588. # MS Compress
  1589. 4    string    \x88\xf0\x27 MS Compress archive data
  1590. # updated by Joerg Jenderek
  1591. >9    string    \0        
  1592. >>0    string    KWAJ        
  1593. >>>7    string    \321\003    MS Compress archive data
  1594. >>>>14    ulong    >0        \b, original size: %ld bytes
  1595. >>>>18        ubyte    >0x65      
  1596. >>>>>18        string    x        \b, was %.8s
  1597. >>>>>(10.b-4)    string    x        \b.%.3s
  1598. # MP3 (archiver, not lossy audio compression)
  1599. 0    string    MP3\x1a MP3-Archiver archive data
  1600. # ZET
  1601. 0    string    OZ├¥ ZET archive data
  1602. # TSComp
  1603. 0    string    \x65\x5d\x13\x8c\x08\x01\x03\x00 TSComp archive data
  1604. # ARQ
  1605. 0    string    gW\4\1 ARQ archive data
  1606. # Squash
  1607. 3    string    OctSqu Squash archive data
  1608. # Terse
  1609. 0    string    \5\1\1\0 Terse archive data
  1610. # PUCrunch
  1611. 0    string    \x01\x08\x0b\x08\xef\x00\x9e\x32\x30\x36\x31 PUCrunch archive data
  1612. # UHarc
  1613. 0    string    UHA UHarc archive data
  1614. # ABComp
  1615. 0    string    \2AB ABComp archive data
  1616. 0    string    \3AB2 ABComp archive data
  1617. # CMP
  1618. 0    string    CO\0 CMP archive data
  1619. # Splint
  1620. 0    string    \x93\xb9\x06 Splint archive data
  1621. # InstallShield
  1622. 0    string     \x13\x5d\x65\x8c InstallShield Z archive Data
  1623. # Gather
  1624. 1    string    GTH Gather archive data
  1625. # BOA
  1626. 0    string    BOA BOA archive data
  1627. # RAX
  1628. 0    string    ULEB\xa RAX archive data
  1629. # Xtreme
  1630. 0    string    ULEB\0 Xtreme archive data
  1631. # Pack Magic
  1632. 0    string    @├ó\1\0 Pack Magic archive data
  1633. # BTS
  1634. 0    belong&0xfeffffff    0x1a034465 BTS archive data
  1635. # ELI 5750
  1636. 0    string    Ora\  ELI 5750 archive data
  1637. # QFC
  1638. 0    string    \x1aFC\x1a QFC archive data
  1639. 0    string    \x1aQF\x1a QFC archive data
  1640. # PRO-PACK
  1641. 0    string    RNC PRO-PACK archive data
  1642. # 777
  1643. 0    string    777 777 archive data
  1644. # LZS221
  1645. 0    string    sTaC LZS221 archive data
  1646. # HPA
  1647. 0    string    HPA HPA archive data
  1648. # Arhangel
  1649. 0    string    LG Arhangel archive data
  1650. # EXP1, uses bzip2
  1651. 0    string    0123456789012345BZh EXP1 archive data
  1652. # IMP
  1653. 0    string    IMP\xa IMP archive data
  1654. # NRV
  1655. 0    string    \x00\x9E\x6E\x72\x76\xFF NRV archive data
  1656. # Squish
  1657. 0    string    \x73\xb2\x90\xf4 Squish archive data
  1658. # Par
  1659. 0    string    PHILIPP Par archive data
  1660. 0    string    PAR Par archive data
  1661. # HIT
  1662. 0    string    UB HIT archive data
  1663. # SBX
  1664. 0    belong&0xfffff000    0x53423000 SBX archive data
  1665. # NaShrink
  1666. 0    string    NSK NaShrink archive data
  1667. # SAPCAR
  1668. 0    string    #\ CAR\ archive\ header SAPCAR archive data
  1669. 0    string    CAR\ 2.00RG SAPCAR archive data
  1670. # Disintegrator
  1671. 0    string    DST Disintegrator archive data
  1672. # ASD
  1673. 0    string    ASD ASD archive data
  1674. # InstallShield CAB
  1675. 0    string    ISc( InstallShield CAB
  1676. # TOP4
  1677. 0    string    T4\x1a TOP4 archive data
  1678. # BatComp left out: sig looks like COM executable
  1679. # so TODO: get real 4dos batcomp file and find sig
  1680. # BlakHole
  1681. 0    string    BH\5\7 BlakHole archive data
  1682. # BIX
  1683. 0    string    BIX0 BIX archive data
  1684. # ChiefLZA
  1685. 0    string    ChfLZ ChiefLZA archive data
  1686. # Blink
  1687. 0    string    Blink Blink archive data
  1688. # Logitech Compress
  1689. 0    string    \xda\xfa Logitech Compress archive data
  1690. # ARS-Sfx (FIXME: really a SFX? then goto COM/EXE)
  1691. 1    string    (C)\ STEPANYUK ARS-Sfx archive data
  1692. # AKT/AKT32
  1693. 0    string    AKT32 AKT32 archive data
  1694. 0    string    AKT AKT archive data
  1695. # NPack
  1696. 0    string    MSTSM NPack archive data
  1697. # PFT
  1698. 0    string    \0\x50\0\x14 PFT archive data
  1699. # SemOne
  1700. 0    string    SEM SemOne archive data
  1701. # PPMD
  1702. 0    string    \x8f\xaf\xac\x84 PPMD archive data
  1703. # FIZ
  1704. 0    string    FIZ FIZ archive data
  1705. # MSXiE
  1706. 0    belong&0xfffff0f0    0x4d530000 MSXiE archive data
  1707. # DeepFreezer
  1708. 0    belong&0xfffffff0    0x797a3030 DeepFreezer archive data
  1709. # DC
  1710. 0    string    =<DC- DC archive data
  1711. # TPac
  1712. 0    string    \4TPAC\3 TPac archive data
  1713. # Ai
  1714. 0    string    Ai\1\1\0 Ai archive data
  1715. 0    string    Ai\1\0\0 Ai archive data
  1716. # Ai32
  1717. 0    string    Ai\2\0 Ai32 archive data
  1718. 0    string    Ai\2\1 Ai32 archive data
  1719. # SBC
  1720. 0    string    SBC SBC archive data
  1721. # Ybs
  1722. 0    string    YBS Ybs archive data
  1723. # DitPack
  1724. 0    string    \x9e\0\0 DitPack archive data
  1725. # DMS
  1726. 0    string    DMS! DMS archive data
  1727. # EPC
  1728. 0    string    \x8f\xaf\xac\x8c EPC archive data
  1729. # VSARC
  1730. 0    string    VS\x1a VSARC archive data
  1731. # PDZ
  1732. 0    string    PDZ PDZ archive data
  1733. # ReDuq
  1734. 0    string    rdqx ReDuq archive data
  1735. # GCA
  1736. 0    string    GCAX GCA archive data
  1737. # PPMN
  1738. 0    string    pN PPMN archive data
  1739. # WinImage
  1740. 3    string    WINIMAGE WinImage archive data
  1741. # Compressia
  1742. 0    string    CMP0CMP Compressia archive data
  1743. # UHBC
  1744. 0    string    UHB UHBC archive data
  1745. # WinHKI
  1746. 0    string    \x61\x5C\x04\x05 WinHKI archive data
  1747. # WWPack data file
  1748. 0    string    WWP WWPack archive data
  1749. # BSN (BSA, PTS-DOS)
  1750. 0    string    \xffBSG BSN archive data
  1751. 1    string    \xffBSG BSN archive data
  1752. 3    string    \xffBSG BSN archive data
  1753. 1    string    \0\xae\2 BSN archive data
  1754. 1    string    \0\xae\3 BSN archive data
  1755. 1    string    \0\xae\7 BSN archive data
  1756. # AIN
  1757. 0    string    \x33\x18 AIN archive data
  1758. 0    string    \x33\x17 AIN archive data
  1759. # XPA32
  1760. 0    string    xpa\0\1 XPA32 archive data
  1761. # SZip (TODO: doesn't catch all versions)
  1762. 0    string    SZ\x0a\4 SZip archive data
  1763. # XPack DiskImage
  1764. 0    string    jm XPack DiskImage archive data
  1765. # XPack Data
  1766. 0    string    xpa XPack archive data
  1767. # XPack Single Data
  1768. 0    string    ├ì\ jm XPack single archive data
  1769.  
  1770. # TODO: missing due to unknown magic/magic at end of file:
  1771. #DWC
  1772. #ARG
  1773. #ZAR
  1774. #PC/3270
  1775. #InstallIt
  1776. #RKive
  1777. #RK
  1778. #XPack Diskimage
  1779.  
  1780. # These were inspired by idarc, but actually verified
  1781. # Dzip archiver (.dz)
  1782. 0    string    DZ Dzip archive data
  1783. >2    byte    x \b, version %i
  1784. >3    byte    x \b.%i
  1785. # ZZip archiver (.zz)
  1786. 0    string    ZZ\ \0\0 ZZip archive data
  1787. 0    string    ZZ0 ZZip archive data
  1788. # PAQ archiver (.paq)
  1789. 0    string    \xaa\x40\x5f\x77\x1f\xe5\x82\x0d PAQ archive data
  1790. 0    string    PAQ PAQ archive data
  1791. >3    byte&0xf0    0x30
  1792. >>3    byte    x (v%c)
  1793. # JAR archiver (.j), this is the successor to ARJ, not Java's JAR (which is essentially ZIP)
  1794. 0xe    string    \x1aJar\x1b JAR (ARJ Software, Inc.) archive data
  1795. 0    string    JARCS JAR (ARJ Software, Inc.) archive data
  1796.  
  1797. # ARJ archiver (jason@jarthur.Claremont.EDU)
  1798. 0    leshort        0xea60        ARJ archive data
  1799. !:mime    application/x-arj
  1800. >5    byte        x        \b, v%d,
  1801. >8    byte        &0x04        multi-volume,
  1802. >8    byte        &0x10        slash-switched,
  1803. >8    byte        &0x20        backup,
  1804. >34    string        x        original name: %s,
  1805. >7    byte        0        os: MS-DOS
  1806. >7    byte        1        os: PRIMOS
  1807. >7    byte        2        os: Unix
  1808. >7    byte        3        os: Amiga
  1809. >7    byte        4        os: Macintosh
  1810. >7    byte        5        os: OS/2
  1811. >7    byte        6        os: Apple ][ GS
  1812. >7    byte        7        os: Atari ST
  1813. >7    byte        8        os: NeXT
  1814. >7    byte        9        os: VAX/VMS
  1815. >3    byte        >0        %d]
  1816. # [JW] idarc says this is also possible
  1817. 2    leshort        0xea60        ARJ archive data
  1818.  
  1819. # HA archiver (Greg Roelofs, newt@uchicago.edu)
  1820. # This is a really bad format. A file containing HAWAII will match this...
  1821. #0    string        HA        HA archive data,
  1822. #>2    leshort        =1        1 file,
  1823. #>2    leshort        >1        %u files,
  1824. #>4    byte&0x0f    =0        first is type CPY
  1825. #>4    byte&0x0f    =1        first is type ASC
  1826. #>4    byte&0x0f    =2        first is type HSC
  1827. #>4    byte&0x0f    =0x0e        first is type DIR
  1828. #>4    byte&0x0f    =0x0f        first is type SPECIAL
  1829. # suggestion: at least identify small archives (<1024 files)
  1830. 0  belong&0xffff00fc 0x48410000 HA archive data
  1831. >2    leshort        =1        1 file,
  1832. >2    leshort        >1        %u files,
  1833. >4    byte&0x0f    =0        first is type CPY
  1834. >4    byte&0x0f    =1        first is type ASC
  1835. >4    byte&0x0f    =2        first is type HSC
  1836. >4    byte&0x0f    =0x0e        first is type DIR
  1837. >4    byte&0x0f    =0x0f        first is type SPECIAL
  1838.  
  1839. # HPACK archiver (Peter Gutmann, pgut1@cs.aukuni.ac.nz)
  1840. 0    string        HPAK        HPACK archive data
  1841.  
  1842. # JAM Archive volume format, by Dmitry.Kohmanyuk@UA.net
  1843. 0    string        \351,\001JAM\         JAM archive,
  1844. >7    string        >\0            version %.4s
  1845. >0x26    byte        =0x27            -
  1846. >>0x2b    string          >\0            label %.11s,
  1847. >>0x27    lelong        x            serial %08x,
  1848. >>0x36    string        >\0            fstype %.8s
  1849.  
  1850. # LHARC/LHA archiver (Greg Roelofs, newt@uchicago.edu)
  1851. 2    string        -lh0-        LHarc 1.x/ARX archive data [lh0]
  1852. !:mime    application/x-lharc
  1853. 2    string        -lh1-        LHarc 1.x/ARX archive data [lh1]
  1854. !:mime    application/x-lharc
  1855. 2    string        -lz4-        LHarc 1.x archive data [lz4]
  1856. !:mime    application/x-lharc
  1857. 2    string        -lz5-        LHarc 1.x archive data [lz5]
  1858. !:mime    application/x-lharc
  1859. #    [never seen any but the last; -lh4- reported in comp.compression:]
  1860. 2    string        -lzs-        LHa/LZS archive data [lzs]
  1861. !:mime    application/x-lha
  1862. 2    string        -lh\40-        LHa 2.x? archive data [lh ]
  1863. !:mime    application/x-lha
  1864. 2    string        -lhd-        LHa 2.x? archive data [lhd]
  1865. !:mime    application/x-lha
  1866. 2    string        -lh2-        LHa 2.x? archive data [lh2]
  1867. !:mime    application/x-lha
  1868. 2    string        -lh3-        LHa 2.x? archive data [lh3]
  1869. !:mime    application/x-lha
  1870. 2    string        -lh4-        LHa (2.x) archive data [lh4]
  1871. !:mime    application/x-lha
  1872. 2    string        -lh5-        LHa (2.x) archive data [lh5]
  1873. !:mime    application/x-lha
  1874. 2    string        -lh6-        LHa (2.x) archive data [lh6]
  1875. !:mime    application/x-lha
  1876. 2    string        -lh7-        LHa (2.x)/LHark archive data [lh7]
  1877. !:mime    application/x-lha
  1878. >20    byte        x        - header level %d
  1879. # taken from idarc [JW]
  1880. 2   string      -lZ         PUT archive data
  1881. 2   string      -lz         LZS archive data 
  1882. 2   string      -sw1-       Swag archive data
  1883.  
  1884. # RAR archiver (Greg Roelofs, newt@uchicago.edu)
  1885. 0    string        Rar!        RAR archive data,
  1886. !:mime    application/x-rar
  1887. >44    byte        x        v%0x,
  1888. >10    byte        >0        flags:
  1889. >>10    byte        &0x01        Archive volume,
  1890. >>10    byte        &0x02        Commented,
  1891. >>10    byte        &0x04        Locked,
  1892. >>10    byte        &0x08        Solid,
  1893. >>10    byte        &0x20        Authenticated,
  1894. >35    byte        0        os: MS-DOS
  1895. >35    byte        1        os: OS/2
  1896. >35    byte        2        os: Win32
  1897. >35    byte        3        os: Unix
  1898. # some old version? idarc says:
  1899. 0   string      RE\x7e\x5e  RAR archive data
  1900.  
  1901. # SQUISH archiver (Greg Roelofs, newt@uchicago.edu)
  1902. 0    string        SQSH        squished archive data (Acorn RISCOS)
  1903.  
  1904. # UC2 archiver (Greg Roelofs, newt@uchicago.edu)
  1905. # [JW] see exe section for self-extracting version
  1906. 0    string        UC2\x1a        UC2 archive data
  1907.  
  1908. # ZIP archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
  1909. 0    string        PK\003\004
  1910. >4    byte        0x00        Zip archive data
  1911. !:mime    application/zip
  1912. >4    byte        0x09        Zip archive data, at least v0.9 to extract
  1913. !:mime    application/zip
  1914. >4    byte        0x0a        Zip archive data, at least v1.0 to extract
  1915. !:mime    application/zip
  1916. >4    byte        0x0b        Zip archive data, at least v1.1 to extract
  1917. !:mime    application/zip
  1918. >0x161    string        WINZIP          Zip archive data, WinZIP self-extracting
  1919. !:mime    application/zip
  1920. >4    byte        0x14
  1921. >>30    ubelong        !0x6d696d65    Zip archive data, at least v2.0 to extract
  1922. !:mime    application/zip
  1923.  
  1924. # OpenOffice.org / KOffice / StarOffice documents
  1925. # From: Abel Cheung <abel@oaka.org>
  1926. # Listed here because they are basically zip files
  1927. >>30    string        mimetype
  1928.  
  1929. # KOffice (1.2 or above) formats
  1930. >>>50    string    vnd.kde.        KOffice (>=1.2)
  1931. >>>>58    string    karbon            Karbon document
  1932. >>>>58    string    kchart            KChart document
  1933. >>>>58    string    kformula        KFormula document
  1934. >>>>58    string    kivio            Kivio document
  1935. >>>>58    string    kontour            Kontour document
  1936. >>>>58    string    kpresenter        KPresenter document
  1937. >>>>58    string    kspread            KSpread document
  1938. >>>>58    string    kword            KWord document
  1939.  
  1940. # OpenOffice formats (for OpenOffice 1.x / StarOffice 6/7)
  1941. >>>50    string    vnd.sun.xml.        OpenOffice.org 1.x
  1942. >>>>62    string    writer            Writer
  1943. >>>>>68    byte    !0x2e            document
  1944. >>>>>68    string    .template        template
  1945. >>>>>68    string    .global            global document
  1946. >>>>62    string    calc            Calc
  1947. >>>>>66    byte    !0x2e            spreadsheet
  1948. >>>>>66    string    .template        template
  1949. >>>>62    string    draw            Draw
  1950. >>>>>66    byte    !0x2e            document
  1951. >>>>>66    string    .template        template
  1952. >>>>62    string    impress            Impress
  1953. >>>>>69    byte    !0x2e            presentation
  1954. >>>>>69    string    .template        template
  1955. >>>>62    string    math            Math document
  1956.  
  1957. # OpenDocument formats (for OpenOffice 2.x / StarOffice >= 8)
  1958. # http://lists.oasis-open.org/archives/office/200505/msg00006.html
  1959. >>>50    string    vnd.oasis.opendocument.    OpenDocument
  1960. >>>>73    string    text
  1961. >>>>>77    byte    !0x2d            Text
  1962. !:mime    application/vnd.oasis.opendocument.text
  1963. >>>>>77    string    -template        Text Template
  1964. >>>>>77    string    -web            HTML Document Template
  1965. >>>>>77    string    -master            Master Document
  1966. >>>>73    string    graphics        Drawing
  1967. >>>>>81    string    -template        Template
  1968. >>>>73    string    presentation        Presentation
  1969. >>>>>85    string    -template        Template
  1970. >>>>73    string    spreadsheet        Spreadsheet
  1971. >>>>>84    string    -template        Template
  1972. >>>>73    string    chart            Chart
  1973. >>>>>78    string    -template        Template
  1974. >>>>73    string    formula            Formula
  1975. >>>>>80    string    -template        Template
  1976. >>>>73    string    database        Database
  1977. >>>>73    string    image            Image
  1978.  
  1979. # Zoo archiver
  1980. 20    lelong        0xfdc4a7dc    Zoo archive data
  1981. !:mime    application/x-zoo
  1982. >4    byte        >48        \b, v%c.
  1983. >>6    byte        >47        \b%c
  1984. >>>7    byte        >47        \b%c
  1985. >32    byte        >0        \b, modify: v%d
  1986. >>33    byte        x        \b.%d+
  1987. >42    lelong        0xfdc4a7dc    \b,
  1988. >>70    byte        >0        extract: v%d
  1989. >>>71    byte        x        \b.%d+
  1990.  
  1991. # Shell archives
  1992. 10    string        #\ This\ is\ a\ shell\ archive    shell archive text
  1993. !:mime    application/octet-stream
  1994.  
  1995. #
  1996. # LBR. NB: May conflict with the questionable 
  1997. #          "binary Computer Graphics Metafile" format.
  1998. #
  1999. 0       string  \0\ \ \ \ \ \ \ \ \ \ \ \0\0    LBR archive data
  2000. #
  2001. # PMA (CP/M derivative of LHA)
  2002. #
  2003. 2       string          -pm0-           PMarc archive data [pm0]
  2004. 2       string          -pm1-           PMarc archive data [pm1]
  2005. 2       string          -pm2-           PMarc archive data [pm2]
  2006. 2       string          -pms-           PMarc SFX archive (CP/M, DOS)
  2007. 5       string          -pc1-           PopCom compressed executable (CP/M)
  2008.  
  2009. # From Rafael Laboissiere <rafael@laboissiere.net>
  2010. # The Project Revision Control System (see
  2011. # http://prcs.sourceforge.net) generates a packaged project
  2012. # file which is recognized by the following entry: 
  2013. 0    leshort        0xeb81    PRCS packaged project
  2014.  
  2015. # Microsoft cabinets 
  2016. # by David Necas (Yeti) <yeti@physics.muni.cz>
  2017. #0    string    MSCF\0\0\0\0    Microsoft cabinet file data,
  2018. #>25    byte    x        v%d
  2019. #>24    byte    x        \b.%d
  2020. # MPi: All CABs have version 1.3, so this is pointless.
  2021. # Better magic in debian-additions.
  2022.  
  2023. # GTKtalog catalogs 
  2024. # by David Necas (Yeti) <yeti@physics.muni.cz>
  2025. 4    string    gtktalog\     GTKtalog catalog data,
  2026. >13    string    3        version 3
  2027. >>14    beshort    0x677a        (gzipped)
  2028. >>14    beshort    !0x677a        (not gzipped)
  2029. >13    string    >3        version %s
  2030.  
  2031. ############################################################################
  2032. # Parity archive reconstruction file, the 'par' file format now used on Usenet.
  2033. 0       string          PAR\0    PARity archive data
  2034. >48    leshort        =0    - Index file
  2035. >48    leshort        >0    - file number %d
  2036.  
  2037. # Felix von Leitner <felix-file@fefe.de>
  2038. 0    string    d8:announce    BitTorrent file
  2039. !:mime    application/x-bittorrent
  2040.  
  2041. # Atari MSA archive - Teemu Hukkanen <tjhukkan@iki.fi>
  2042. 0       beshort 0x0e0f          Atari MSA archive data
  2043. >2      beshort x           \b, %d sectors per track
  2044. >4      beshort 0           \b, 1 sided
  2045. >4      beshort 1           \b, 2 sided
  2046. >6      beshort x           \b, starting track: %d
  2047. >8      beshort x           \b, ending track: %d
  2048.  
  2049. # Alternate ZIP string (amc@arwen.cs.berkeley.edu)
  2050. 0    string    PK00PK\003\004    Zip archive data
  2051.  
  2052. # ACE archive (from http://www.wotsit.org/download.asp?f=ace)
  2053. # by Stefan `Sec` Zehl <sec@42.org>
  2054. 7    string        **ACE**        ACE archive data
  2055. >15    byte    >0        version %d
  2056. >16    byte    =0x00        \b, from MS-DOS
  2057. >16    byte    =0x01        \b, from OS/2
  2058. >16    byte    =0x02        \b, from Win/32
  2059. >16    byte    =0x03        \b, from Unix
  2060. >16    byte    =0x04        \b, from MacOS
  2061. >16    byte    =0x05        \b, from WinNT
  2062. >16    byte    =0x06        \b, from Primos
  2063. >16    byte    =0x07        \b, from AppleGS
  2064. >16    byte    =0x08        \b, from Atari
  2065. >16    byte    =0x09        \b, from Vax/VMS
  2066. >16    byte    =0x0A        \b, from Amiga
  2067. >16    byte    =0x0B        \b, from Next
  2068. >14    byte    x        \b, version %d to extract
  2069. >5    leshort &0x0080        \b, multiple volumes,
  2070. >>17    byte    x        \b (part %d),
  2071. >5    leshort &0x0002        \b, contains comment
  2072. >5    leshort    &0x0200        \b, sfx
  2073. >5    leshort    &0x0400        \b, small dictionary
  2074. >5    leshort    &0x0800        \b, multi-volume
  2075. >5    leshort    &0x1000        \b, contains AV-String
  2076. >>30    string    \x16*UNREGISTERED\x20VERSION*    (unregistered)
  2077. >5    leshort &0x2000        \b, with recovery record
  2078. >5    leshort &0x4000        \b, locked
  2079. >5    leshort &0x8000        \b, solid
  2080. # Date in MS-DOS format (whatever that is)
  2081. #>18    lelong    x        Created on
  2082.  
  2083. # sfArk : compression program for Soundfonts (sf2) by Dirk Jagdmann
  2084. # <doj@cubic.org>
  2085. 0x1A    string    sfArk        sfArk compressed Soundfont
  2086. >0x15    string    2
  2087. >>0x1    string    >\0        Version %s
  2088. >>0x2A    string    >\0        : %s
  2089.  
  2090. # DR-DOS 7.03 Packed File *.??_
  2091. 0    string    Packed\ File\     Personal NetWare Packed File
  2092. >12    string    x            \b, was "%.12s"
  2093.  
  2094. # EET archive
  2095. # From: Tilman Sauerbeck <tilman@code-monkey.de>
  2096. 0    belong    0x1ee7ff00    EET archive
  2097. !:mime    application/x-eet
  2098.  
  2099. # rzip archives
  2100. 0    string    RZIP        rzip compressed data
  2101. >4    byte    x        - version %d
  2102. >5    byte    x        \b.%d
  2103. >6    belong    x        (%d bytes)
  2104.  
  2105. # From: "Robert Dale" <robdale@gmail.com>
  2106. 0    belong    123        dar archive,
  2107. >4    belong    x        label "%.8x
  2108. >>8    belong    x        %.8x
  2109. >>>12    beshort    x        %.4x"
  2110. >14    byte    0x54        end slice
  2111. >14    beshort    0x4e4e        multi-part
  2112. >14    beshort    0x4e53        multi-part, with -S
  2113.  
  2114. # Symbian installation files
  2115. #  http://www.thouky.co.uk/software/psifs/sis.html
  2116. #  http://developer.symbian.com/main/downloads/papers/SymbianOSv91/softwareinstallsis.pdf
  2117. 8    lelong    0x10000419    Symbian installation file
  2118. !:mime    application/vnd.symbian.install
  2119. >4    lelong    0x1000006D    (EPOC release 3/4/5)
  2120. >4    lelong    0x10003A12    (EPOC release 6)
  2121. 0    lelong    0x10201A7A    Symbian installation file (Symbian OS 9.x)
  2122. !:mime    x-epoc/x-sisx-app
  2123.  
  2124. # Pack200 Java archives, http://jcp.org/en/jsr/detail?id=200
  2125. 0    belong    0xcafed00d    Pack200 Java archive
  2126.  
  2127. # From "Nelson A. de Oliveira" <naoliv@gmail.com>
  2128. 0    string    MPQ\032        MoPaQ (MPQ) archive
  2129.  
  2130. # From: Dirk Jagdmann <doj@cubic.org>
  2131. # xar archive format: http://code.google.com/p/xar/
  2132. 0    string    xar!        xar archive
  2133. >6    beshort    x        - version %ld
  2134.  
  2135. # From: "Nelson A. de Oliveira" <naoliv@gmail.com>
  2136. # .kgb
  2137. 0    string KGB_arch        KGB Archiver file
  2138. >10    string x        with compression level %.1s
  2139.  
  2140. # xar (eXtensible ARchiver) archive
  2141. # From: "David Remahl" <dremahl@apple.com>
  2142. 0    string    xar!        xar archive
  2143. #>4    beshort    x        header size %d
  2144. >6    beshort    x        version %d,
  2145. #>8    quad    x        compressed TOC: %d,
  2146. #>16    quad    x        uncompressed TOC: %d,
  2147. >24    belong    0        no checksum
  2148. >24    belong    1        SHA-1 checksum
  2149. >24    belong    2        MD5 checksum
  2150.  
  2151. # Type: Parity Archive
  2152. # From: Daniel van Eeden <daniel_e@dds.nl>
  2153. 0    string     PAR2        Parity Archive Volume Set
  2154.  
  2155. #------------------------------------------------------------------------------
  2156. # asterix:  file(1) magic for Aster*x; SunOS 5.5.1 gave the 4-character
  2157. # strings as "long" - we assume they're just strings:
  2158. # From: guy@netapp.com (Guy Harris)
  2159. #
  2160. 0    string        *STA        Aster*x
  2161. >7    string        WORD            Words Document
  2162. >7    string        GRAP            Graphic
  2163. >7    string        SPRE            Spreadsheet
  2164. >7    string        MACR            Macro
  2165. 0    string        2278        Aster*x Version 2
  2166. >29    byte        0x36            Words Document
  2167. >29    byte        0x35            Graphic
  2168. >29    byte        0x32            Spreadsheet
  2169. >29    byte        0x38            Macro
  2170.  
  2171.  
  2172. #------------------------------------------------------------------------------
  2173. # att3b:  file(1) magic for AT&T 3B machines
  2174. #
  2175. # The `versions' should be un-commented if they work for you.
  2176. # (Was the problem just one of endianness?)
  2177. #
  2178. # 3B20
  2179. #
  2180. # The 3B20 conflicts with SCCS.
  2181. #0    beshort        0550        3b20 COFF executable
  2182. #>12    belong        >0        not stripped
  2183. #>22    beshort        >0        - version %ld
  2184. #0    beshort        0551        3b20 COFF executable (TV)
  2185. #>12    belong        >0        not stripped
  2186. #>22    beshort        >0        - version %ld
  2187. #
  2188. # WE32K
  2189. #
  2190. 0    beshort        0560        WE32000 COFF
  2191. >18    beshort        ^00000020    object
  2192. >18    beshort        &00000020    executable
  2193. >12    belong        >0        not stripped
  2194. >18    beshort        ^00010000    N/A on 3b2/300 w/paging
  2195. >18    beshort        &00020000    32100 required
  2196. >18    beshort        &00040000    and MAU hardware required
  2197. >20    beshort        0407        (impure)
  2198. >20    beshort        0410        (pure)
  2199. >20    beshort        0413        (demand paged)
  2200. >20    beshort        0443        (target shared library)
  2201. >22    beshort        >0        - version %ld
  2202. 0    beshort        0561        WE32000 COFF executable (TV)
  2203. >12    belong        >0        not stripped
  2204. #>18    beshort        &00020000    - 32100 required
  2205. #>18    beshort        &00040000    and MAU hardware required
  2206. #>22    beshort        >0        - version %ld
  2207. #
  2208. # core file for 3b2 
  2209. 0    string        \000\004\036\212\200    3b2 core file
  2210. >364    string        >\0        of '%s'
  2211. #------------------------------------------------------------------------------
  2212. # audio:  file(1) magic for sound formats (see also "iff")
  2213. #
  2214. # Jan Nicolai Langfeldt (janl@ifi.uio.no), Dan Quinlan (quinlan@yggdrasil.com),
  2215. # and others
  2216. #
  2217.  
  2218. # Sun/NeXT audio data
  2219. 0    string        .snd        Sun/NeXT audio data:
  2220. >12    belong        1        8-bit ISDN mu-law,
  2221. !:mime    audio/basic
  2222. >12    belong        2        8-bit linear PCM [REF-PCM],
  2223. !:mime    audio/basic
  2224. >12    belong        3        16-bit linear PCM,
  2225. !:mime    audio/basic
  2226. >12    belong        4        24-bit linear PCM,
  2227. !:mime    audio/basic
  2228. >12    belong        5        32-bit linear PCM,
  2229. !:mime    audio/basic
  2230. >12    belong        6        32-bit IEEE floating point,
  2231. !:mime    audio/basic
  2232. >12    belong        7        64-bit IEEE floating point,
  2233. !:mime    audio/basic
  2234. >12    belong        8        Fragmented sample data,
  2235. >12    belong        10        DSP program,
  2236. >12    belong        11        8-bit fixed point,
  2237. >12    belong        12        16-bit fixed point,
  2238. >12    belong        13        24-bit fixed point,
  2239. >12    belong        14        32-bit fixed point,
  2240. >12    belong        18        16-bit linear with emphasis,
  2241. >12    belong        19        16-bit linear compressed,
  2242. >12    belong        20        16-bit linear with emphasis and compression,
  2243. >12    belong        21        Music kit DSP commands,
  2244. >12    belong        23        8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice enc.),
  2245. !:mime  audio/x-adpcm
  2246. >12    belong        24        compressed (8-bit CCITT G.722 ADPCM)
  2247. >12    belong        25        compressed (3-bit CCITT G.723.3 ADPCM),
  2248. >12    belong        26        compressed (5-bit CCITT G.723.5 ADPCM),
  2249. >12    belong        27        8-bit A-law (CCITT G.711),
  2250. >20    belong        1        mono,
  2251. >20    belong        2        stereo,
  2252. >20    belong        4        quad,
  2253. >16    belong        >0        %d Hz
  2254.  
  2255. # DEC systems (e.g. DECstation 5000) use a variant of the Sun/NeXT format
  2256. # that uses little-endian encoding and has a different magic number
  2257. 0    lelong        0x0064732E    DEC audio data:
  2258. >12    lelong        1        8-bit ISDN mu-law,
  2259. !:mime    audio/x-dec-basic
  2260. >12    lelong        2        8-bit linear PCM [REF-PCM],
  2261. !:mime    audio/x-dec-basic
  2262. >12    lelong        3        16-bit linear PCM,
  2263. !:mime    audio/x-dec-basic
  2264. >12    lelong        4        24-bit linear PCM,
  2265. !:mime    audio/x-dec-basic
  2266. >12    lelong        5        32-bit linear PCM,
  2267. !:mime    audio/x-dec-basic
  2268. >12    lelong        6        32-bit IEEE floating point,
  2269. !:mime    audio/x-dec-basic
  2270. >12    lelong        7        64-bit IEEE floating point,
  2271. !:mime    audio/x-dec-basic
  2272. >12    belong        8        Fragmented sample data,
  2273. >12    belong        10        DSP program,
  2274. >12    belong        11        8-bit fixed point,
  2275. >12    belong        12        16-bit fixed point,
  2276. >12    belong        13        24-bit fixed point,
  2277. >12    belong        14        32-bit fixed point,
  2278. >12    belong        18        16-bit linear with emphasis,
  2279. >12    belong        19        16-bit linear compressed,
  2280. >12    belong        20        16-bit linear with emphasis and compression,
  2281. >12    belong        21        Music kit DSP commands,
  2282. >12    lelong        23        8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice enc.),
  2283. !:mime    audio/x-dec-basic
  2284. >12    belong        24        compressed (8-bit CCITT G.722 ADPCM)
  2285. >12    belong        25        compressed (3-bit CCITT G.723.3 ADPCM),
  2286. >12    belong        26        compressed (5-bit CCITT G.723.5 ADPCM),
  2287. >12    belong        27        8-bit A-law (CCITT G.711),
  2288. >20    lelong        1        mono,
  2289. >20    lelong        2        stereo,
  2290. >20    lelong        4        quad,
  2291. >16    lelong        >0        %d Hz
  2292.  
  2293. # Creative Labs AUDIO stuff
  2294. 0    string    MThd            Standard MIDI data
  2295. !:mime    audio/midi
  2296. >8     beshort    x            (format %d)
  2297. >10    beshort    x            using %d track
  2298. >10    beshort        >1        \bs
  2299. >12    beshort&0x7fff    x        at 1/%d
  2300. >12    beshort&0x8000    >0        SMPTE
  2301.  
  2302. 0    string    CTMF            Creative Music (CMF) data
  2303. !:mime    audio/x-unknown
  2304. 0    string    SBI            SoundBlaster instrument data
  2305. !:mime    audio/x-unknown
  2306. 0    string    Creative\ Voice\ File    Creative Labs voice data
  2307. !:mime    audio/x-unknown
  2308. # is this next line right?  it came this way...
  2309. >19    byte    0x1A
  2310. >23    byte    >0            - version %d
  2311. >22    byte    >0            \b.%d
  2312.  
  2313. # first entry is also the string "NTRK"
  2314. 0    belong        0x4e54524b    MultiTrack sound data
  2315. >4    belong        x        - version %ld
  2316.  
  2317. # Extended MOD format (*.emd) (Greg Roelofs, newt@uchicago.edu); NOT TESTED
  2318. # [based on posting 940824 by "Dirk/Elastik", husberg@lehtori.cc.tut.fi]
  2319. 0    string        EMOD        Extended MOD sound data,
  2320. >4    byte&0xf0    x        version %d
  2321. >4    byte&0x0f    x        \b.%d,
  2322. >45    byte        x        %d instruments
  2323. >83    byte        0        (module)
  2324. >83    byte        1        (song)
  2325.  
  2326. # Real Audio (Magic .ra\0375)
  2327. 0    belong        0x2e7261fd    RealAudio sound file
  2328. !:mime    audio/x-pn-realaudio
  2329. 0    string        .RMF\0\0\0    RealMedia file
  2330. !:mime    application/vnd.rn-realmedia
  2331. #video/x-pn-realvideo
  2332. #video/vnd.rn-realvideo
  2333. #application/vnd.rn-realmedia
  2334. #    sigh, there are many mimes for that but the above are the most common.
  2335.  
  2336. # MTM/669/FAR/S3M/ULT/XM format checking [Aaron Eppert, aeppert@dialin.ind.net]
  2337. # Oct 31, 1995
  2338. # fixed by <doj@cubic.org> 2003-06-24
  2339. # Too short...
  2340. #0    string        MTM        MultiTracker Module sound file
  2341. #0    string        if        Composer 669 Module sound data
  2342. #0    string        JN        Composer 669 Module sound data (extended format)
  2343. 0    string        MAS_U        ULT(imate) Module sound data
  2344.  
  2345. #0    string        FAR        Module sound data
  2346. #>4    string        >\15        Title: "%s"
  2347.  
  2348. 0x2c    string        SCRM        ScreamTracker III Module sound data
  2349. >0    string        >\0        Title: "%s"
  2350.  
  2351. # Gravis UltraSound patches
  2352. # From <ache@nagual.ru>
  2353.  
  2354. 0    string        GF1PATCH110\0ID#000002\0    GUS patch
  2355. 0    string        GF1PATCH100\0ID#000002\0    Old GUS    patch
  2356.  
  2357. # mime types according to http://www.geocities.com/nevilo/mod.htm:
  2358. #    audio/it    .it
  2359. #    audio/x-zipped-it    .itz
  2360. #    audio/xm    fasttracker modules
  2361. #    audio/x-s3m    screamtracker modules
  2362. #    audio/s3m    screamtracker modules
  2363. #    audio/x-zipped-mod    mdz
  2364. #    audio/mod    mod
  2365. #    audio/x-mod    All modules (mod, s3m, 669, mtm, med, xm, it, mdz, stm, itz, xmz, s3z)
  2366.  
  2367. #
  2368. # Taken from loader code from mikmod version 2.14
  2369. # by Steve McIntyre (stevem@chiark.greenend.org.uk)
  2370. # <doj@cubic.org> added title printing on 2003-06-24
  2371. 0    string    MAS_UTrack_V00
  2372. >14    string    >/0        ultratracker V1.%.1s module sound data
  2373. !:mime    audio/x-mod
  2374. #audio/x-tracker-module
  2375.  
  2376. 0    string    UN05        MikMod UNI format module sound data
  2377.  
  2378. 0    string    Extended\ Module: Fasttracker II module sound data
  2379. !:mime    audio/x-mod
  2380. #audio/x-tracker-module
  2381. >17    string    >\0        Title: "%s"
  2382.  
  2383. 21    string/c    =!SCREAM!    Screamtracker 2 module sound data
  2384. !:mime    audio/x-mod
  2385. #audio/x-screamtracker-module
  2386. 21    string    BMOD2STM    Screamtracker 2 module sound data
  2387. !:mime    audio/x-mod
  2388. #audio/x-screamtracker-module
  2389. 1080    string    M.K.        4-channel Protracker module sound data
  2390. !:mime    audio/x-mod
  2391. #audio/x-protracker-module
  2392. >0    string    >\0        Title: "%s"
  2393. 1080    string    M!K!        4-channel Protracker module sound data
  2394. !:mime    audio/x-mod
  2395. #audio/x-protracker-module
  2396. >0    string    >\0        Title: "%s"
  2397. 1080    string    FLT4        4-channel Startracker module sound data
  2398. !:mime    audio/x-mod
  2399. #audio/x-startracker-module
  2400. >0    string    >\0        Title: "%s"
  2401. 1080    string    FLT8        8-channel Startracker module sound data
  2402. !:mime    audio/x-mod
  2403. #audio/x-startracker-module
  2404. >0    string    >\0        Title: "%s"
  2405. 1080    string    4CHN        4-channel Fasttracker module sound data
  2406. !:mime    audio/x-mod
  2407. #audio/x-fasttracker-module
  2408. >0    string    >\0        Title: "%s"
  2409. 1080    string    6CHN        6-channel Fasttracker module sound data
  2410. !:mime    audio/x-mod
  2411. #audio/x-fasttracker-module
  2412. >0    string    >\0        Title: "%s"
  2413. 1080    string    8CHN        8-channel Fasttracker module sound data
  2414. !:mime    audio/x-mod
  2415. #audio/x-fasttracker-module
  2416. >0    string    >\0        Title: "%s"
  2417. 1080    string    CD81        8-channel Octalyser module sound data
  2418. !:mime    audio/x-mod
  2419. #audio/x-octalysertracker-module
  2420. >0    string    >\0        Title: "%s"
  2421. 1080    string    OKTA        8-channel Octalyzer module sound data
  2422. !:mime    audio/x-mod
  2423. #audio/x-octalysertracker-module
  2424. >0    string    >\0        Title: "%s"
  2425. # Not good enough.
  2426. #1082    string    CH
  2427. #>1080    string    >/0        %.2s-channel Fasttracker "oktalyzer" module sound data
  2428. 1080    string    16CN        16-channel Taketracker module sound data
  2429. !:mime    audio/x-mod
  2430. #audio/x-taketracker-module
  2431. >0    string    >\0        Title: "%s"
  2432. 1080    string    32CN        32-channel Taketracker module sound data
  2433. !:mime    audio/x-mod
  2434. #audio/x-taketracker-module
  2435. >0    string    >\0        Title: "%s"
  2436.  
  2437. # TOC sound files -Trevor Johnson <trevor@jpj.net>
  2438. #
  2439. 0       string          TOC             TOC sound file
  2440.  
  2441. # sidfiles <pooka@iki.fi>
  2442. # added name,author,(c) and new RSID type by <doj@cubic.org> 2003-06-24
  2443. 0    string        SIDPLAY\ INFOFILE    Sidplay info file
  2444.  
  2445. 0    string        PSID            PlaySID v2.2+ (AMIGA) sidtune
  2446. >4    beshort        >0            w/ header v%d,
  2447. >14    beshort        =1            single song,
  2448. >14    beshort        >1            %d songs,
  2449. >16    beshort        >0            default song: %d
  2450. >0x16    string        >\0            name: "%s"
  2451. >0x36    string        >\0            author: "%s"
  2452. >0x56    string        >\0            copyright: "%s"
  2453.  
  2454. 0    string        RSID            RSID sidtune PlaySID compatible
  2455. >4    beshort        >0            w/ header v%d,
  2456. >14    beshort        =1            single song,
  2457. >14    beshort        >1            %d songs,
  2458. >16    beshort        >0            default song: %d
  2459. >0x16    string        >\0            name: "%s"
  2460. >0x36    string        >\0            author: "%s"
  2461. >0x56    string        >\0            copyright: "%s"
  2462.  
  2463. # IRCAM <mpruett@sgi.com>
  2464. # VAX and MIPS files are little-endian; Sun and NeXT are big-endian
  2465. 0    belong        0x64a30100        IRCAM file (VAX)
  2466. 0    belong        0x64a30200        IRCAM file (Sun)
  2467. 0    belong        0x64a30300        IRCAM file (MIPS little-endian)
  2468. 0    belong        0x64a30400        IRCAM file (NeXT)
  2469.  
  2470. # NIST SPHERE <mpruett@sgi.com>
  2471. 0    string        NIST_1A\n\ \ \ 1024\n    NIST SPHERE file
  2472.  
  2473. # Sample Vision <mpruett@sgi.com>
  2474. 0    string        SOUND\ SAMPLE\ DATA\     Sample Vision file
  2475.  
  2476. # Audio Visual Research <tonigonenstein@users.sourceforge.net>
  2477. 0    string        2BIT            Audio Visual Research file,
  2478. >12    beshort        =0            mono,
  2479. >12    beshort        =-1            stereo,
  2480. >14    beshort        x            %d bits
  2481. >16    beshort        =0            unsigned,
  2482. >16    beshort        =-1            signed,
  2483. >22    belong&0x00ffffff    x        %d Hz,
  2484. >18    beshort        =0            no loop,
  2485. >18    beshort        =-1            loop,
  2486. >21    ubyte        <=127            note %d,
  2487. >22    byte        =0            replay 5.485 KHz
  2488. >22    byte        =1            replay 8.084 KHz
  2489. >22    byte        =2            replay 10.971 Khz
  2490. >22    byte        =3            replay 16.168 Khz
  2491. >22    byte        =4            replay 21.942 KHz
  2492. >22    byte        =5            replay 32.336 KHz
  2493. >22    byte        =6            replay 43.885 KHz
  2494. >22    byte        =7            replay 47.261 KHz
  2495.  
  2496. # SGI SoundTrack <mpruett@sgi.com>
  2497. 0    string        _SGI_SoundTrack        SGI SoundTrack project file
  2498. # ID3 version 2 tags <waschk@informatik.uni-rostock.de>
  2499. 0    string        ID3    Audio file with ID3 version 2.
  2500. # ??? Normally such a file is an MP3 file, but this will give false positives
  2501. !:mime    audio/mpeg
  2502. >3    ubyte    <0xff    \b%d
  2503. #>4    ubyte    <0xff    \b%d tag
  2504. >2584    string    fLaC        \b, FLAC encoding
  2505. >>2588    byte&0x7f        >0        \b, unknown version
  2506. >>2588    byte&0x7f        0        \b
  2507. # some common bits/sample values
  2508. >>>2600    beshort&0x1f0        0x030        \b, 4 bit
  2509. >>>2600    beshort&0x1f0        0x050        \b, 6 bit
  2510. >>>2600    beshort&0x1f0        0x070        \b, 8 bit
  2511. >>>2600    beshort&0x1f0        0x0b0        \b, 12 bit
  2512. >>>2600    beshort&0x1f0        0x0f0        \b, 16 bit
  2513. >>>2600    beshort&0x1f0        0x170        \b, 24 bit
  2514. >>>2600    byte&0xe        0x0        \b, mono
  2515. >>>2600    byte&0xe        0x2        \b, stereo
  2516. >>>2600    byte&0xe        0x4        \b, 3 channels
  2517. >>>2600    byte&0xe        0x6        \b, 4 channels
  2518. >>>2600    byte&0xe        0x8        \b, 5 channels
  2519. >>>2600    byte&0xe        0xa        \b, 6 channels
  2520. >>>2600    byte&0xe        0xc        \b, 7 channels
  2521. >>>2600    byte&0xe        0xe        \b, 8 channels
  2522. # some common sample rates
  2523. >>>2597    belong&0xfffff0        0x0ac440    \b, 44.1 kHz
  2524. >>>2597    belong&0xfffff0        0x0bb800    \b, 48 kHz
  2525. >>>2597    belong&0xfffff0        0x07d000    \b, 32 kHz
  2526. >>>2597    belong&0xfffff0        0x056220    \b, 22.05 kHz
  2527. >>>2597    belong&0xfffff0        0x05dc00    \b, 24 kHz
  2528. >>>2597    belong&0xfffff0        0x03e800    \b, 16 kHz
  2529. >>>2597    belong&0xfffff0        0x02b110    \b, 11.025 kHz
  2530. >>>2597    belong&0xfffff0        0x02ee00    \b, 12 kHz
  2531. >>>2597    belong&0xfffff0        0x01f400    \b, 8 kHz
  2532. >>>2597    belong&0xfffff0        0x177000    \b, 96 kHz
  2533. >>>2597    belong&0xfffff0        0x0fa000    \b, 64 kHz
  2534. >>>2601    byte&0xf        >0        \b, >4G samples
  2535. >2584    string    !fLaC        \b, MP3 encoding
  2536.  
  2537. # NSF (NES sound file) magic
  2538. 0    string        NESM\x1a    NES Sound File
  2539. >14    string        >\0        ("%s" by
  2540. >46    string        >\0        %s, copyright
  2541. >78    string        >\0        %s),
  2542. >5    byte        x        version %d,
  2543. >6    byte        x        %d tracks,
  2544. >122    byte&0x2    =1        dual PAL/NTSC
  2545. >122    byte&0x1    =1        PAL
  2546. >122    byte&0x1    =0        NTSC
  2547.  
  2548. # Type: SNES SPC700 sound files
  2549. # From: Josh Triplett <josh@freedesktop.org>
  2550. 0    string    SNES-SPC700\ Sound\ File\ Data\ v    SNES SPC700 sound file
  2551. >&0    string    0.30                    \b, version %s
  2552. >>0x23    byte    0x1B                    \b, without ID666 tag
  2553. >>0x23    byte    0x1A                    \b, with ID666 tag
  2554. >>>0x2E    string    >\0                    \b, song "%.32s"
  2555. >>>0x4E    string    >\0                    \b, game "%.32s"
  2556.  
  2557. # Impulse tracker module (audio/x-it)
  2558. 0    string        IMPM        Impulse Tracker module sound data -
  2559. !:mime    audio/x-mod
  2560. >4    string        >\0        "%s"
  2561. >40    leshort        !0        compatible w/ITv%x
  2562. >42    leshort        !0        created w/ITv%x
  2563.  
  2564. # Imago Orpheus module (audio/x-imf)
  2565. 60    string        IM10        Imago Orpheus module sound data -
  2566. >0    string        >\0        "%s"
  2567.  
  2568. # From <collver1@attbi.com>
  2569. # These are the /etc/magic entries to decode modules, instruments, and
  2570. # samples in Impulse Tracker's native format.
  2571.  
  2572. 0    string        IMPS        Impulse Tracker Sample
  2573. >18    byte        &2        16 bit
  2574. >18    byte        ^2        8 bit
  2575. >18    byte        &4        stereo
  2576. >18    byte        ^4        mono
  2577. 0    string        IMPI        Impulse Tracker Instrument
  2578. >28    leshort        !0        ITv%x
  2579. >30    byte        !0        %d samples
  2580.  
  2581. # Yamaha TX Wave:  file(1) magic for Yamaha TX Wave audio files
  2582. # From <collver1@attbi.com>
  2583. 0    string        LM8953        Yamaha TX Wave
  2584. >22    byte        0x49        looped
  2585. >22    byte        0xC9        non-looped
  2586. >23    byte        1        33kHz
  2587. >23    byte        2        50kHz
  2588. >23    byte        3        16kHz
  2589.  
  2590. # scream tracker:  file(1) magic for Scream Tracker sample files
  2591. #
  2592. # From <collver1@attbi.com>
  2593. 76    string        SCRS        Scream Tracker Sample
  2594. >0    byte        1        sample
  2595. >0    byte        2        adlib melody
  2596. >0    byte        >2        adlib drum
  2597. >31    byte        &2        stereo
  2598. >31    byte        ^2        mono
  2599. >31    byte        &4        16bit little endian
  2600. >31    byte        ^4        8bit
  2601. >30    byte        0        unpacked
  2602. >30    byte        1        packed
  2603.  
  2604. # audio
  2605. # From: Cory Dikkers <cdikkers@swbell.net>
  2606. 0    string        MMD0        MED music file, version 0
  2607. 0    string        MMD1        OctaMED Pro music file, version 1
  2608. 0    string        MMD3        OctaMED Soundstudio music file, version 3
  2609. 0    string        OctaMEDCmpr    OctaMED Soundstudio compressed file
  2610. 0    string        MED        MED_Song
  2611. 0    string        SymM        Symphonie SymMOD music file
  2612. #
  2613. 0    string        THX        AHX version
  2614. >3    byte        =0        1 module data
  2615. >3    byte        =1        2 module data
  2616. #
  2617. 0    string        OKTASONG    Oktalyzer module data
  2618. #
  2619. 0    string        DIGI\ Booster\ module\0    %s
  2620. >20    byte        >0        %c
  2621. >>21    byte        >0        \b%c
  2622. >>>22    byte        >0        \b%c
  2623. >>>>23    byte        >0        \b%c
  2624. >610    string        >\0        \b, "%s"
  2625. #
  2626. 0    string        DBM0           DIGI Booster Pro Module
  2627. >4    byte        >0        V%X.
  2628. >>5    byte        x        \b%02X
  2629. >16    string        >\0        \b, "%s"
  2630. #
  2631. 0    string        FTMN        FaceTheMusic module
  2632. >16    string        >\0d        \b, "%s"
  2633.  
  2634. # From: <doj@cubic.org> 2003-06-24
  2635. 0    string        AMShdr\32    Velvet Studio AMS Module v2.2
  2636. 0    string        Extreme        Extreme Tracker AMS Module v1.3
  2637. 0    string        DDMF        Xtracker DMF Module
  2638. >4    byte        x        v%i
  2639. >0xD    string        >\0        Title: "%s"
  2640. >0x2B    string        >\0        Composer: "%s"
  2641. 0    string        DSM\32        Dynamic Studio Module DSM
  2642. 0    string        SONG        DigiTrekker DTM Module
  2643. 0    string        DMDL        DigiTrakker MDL Module
  2644. 0    string        PSM\32        Protracker Studio PSM Module
  2645. 44    string        PTMF        Poly Tracker PTM Module
  2646. >0    string        >\32        Title: "%s"
  2647. 0    string        MT20        MadTracker 2.0 Module MT2
  2648. 0    string        RAD\40by\40REALiTY!! RAD Adlib Tracker Module RAD
  2649. 0    string        RTMM        RTM Module
  2650. 0x426    string        MaDoKaN96    XMS Adlib Module
  2651. >0    string        >\0        Composer: "%s"
  2652. 0    string        AMF        AMF Module
  2653. >4    string        >\0        Title: "%s"
  2654. 0    string        MODINFO1    Open Cubic Player Module Inforation MDZ
  2655. 0    string        Extended\40Instrument: Fast Tracker II Instrument
  2656.  
  2657. # From: Takeshi Hamasaki <hma@syd.odn.ne.jp>
  2658. # NOA Nancy Codec file
  2659. 0    string        \210NOA\015\012\032    NOA Nancy Codec Movie file
  2660. # Yamaha SMAF format
  2661. 0    string        MMMD        Yamaha SMAF file
  2662. # Sharp Jisaku Melody format for PDC
  2663. 0    string        \001Sharp\040JisakuMelody    SHARP Cell-Phone ringing Melody
  2664. >20    string        Ver01.00    Ver. 1.00
  2665. >>32    byte        x        , %d tracks
  2666.  
  2667. # Free lossless audio codec <http://flac.sourceforge.net>
  2668. # From: Przemyslaw Augustyniak <silvathraec@rpg.pl>
  2669. 0    string            fLaC        FLAC audio bitstream data
  2670. !:mime    audio/x-flac
  2671. >4    byte&0x7f        >0        \b, unknown version
  2672. >4    byte&0x7f        0        \b
  2673. # some common bits/sample values
  2674. >>20    beshort&0x1f0        0x030        \b, 4 bit
  2675. >>20    beshort&0x1f0        0x050        \b, 6 bit
  2676. >>20    beshort&0x1f0        0x070        \b, 8 bit
  2677. >>20    beshort&0x1f0        0x0b0        \b, 12 bit
  2678. >>20    beshort&0x1f0        0x0f0        \b, 16 bit
  2679. >>20    beshort&0x1f0        0x170        \b, 24 bit
  2680. >>20    byte&0xe        0x0        \b, mono
  2681. >>20    byte&0xe        0x2        \b, stereo
  2682. >>20    byte&0xe        0x4        \b, 3 channels
  2683. >>20    byte&0xe        0x6        \b, 4 channels
  2684. >>20    byte&0xe        0x8        \b, 5 channels
  2685. >>20    byte&0xe        0xa        \b, 6 channels
  2686. >>20    byte&0xe        0xc        \b, 7 channels
  2687. >>20    byte&0xe        0xe        \b, 8 channels
  2688. # some common sample rates
  2689. >>17    belong&0xfffff0        0x0ac440    \b, 44.1 kHz
  2690. >>17    belong&0xfffff0        0x0bb800    \b, 48 kHz
  2691. >>17    belong&0xfffff0        0x07d000    \b, 32 kHz
  2692. >>17    belong&0xfffff0        0x056220    \b, 22.05 kHz
  2693. >>17    belong&0xfffff0        0x05dc00    \b, 24 kHz
  2694. >>17    belong&0xfffff0        0x03e800    \b, 16 kHz
  2695. >>17    belong&0xfffff0        0x02b110    \b, 11.025 kHz
  2696. >>17    belong&0xfffff0        0x02ee00    \b, 12 kHz
  2697. >>17    belong&0xfffff0        0x01f400    \b, 8 kHz
  2698. >>17    belong&0xfffff0        0x177000    \b, 96 kHz
  2699. >>17    belong&0xfffff0        0x0fa000    \b, 64 kHz
  2700. >>21    byte&0xf        >0        \b, >4G samples
  2701. >>21    byte&0xf        0        \b
  2702. >>>22    belong            >0        \b, %u samples
  2703. >>>22    belong            0        \b, length unknown
  2704.  
  2705. # (ISDN) VBOX voice message file (Wolfram Kleff)
  2706. 0       string          VBOX            VBOX voice message data
  2707.  
  2708. # ReBorn Song Files (.rbs)
  2709. # David J. Singer <doc@deadvirgins.org.uk>
  2710. 8       string          RB40             RBS Song file
  2711. >29     string          ReBorn           created by ReBorn
  2712. >37     string          Propellerhead    created by ReBirth
  2713.  
  2714. # Synthesizer Generator and Kimwitu share their file format
  2715. 0    string        A#S#C#S#S#L#V#3        Synthesizer Generator or Kimwitu data
  2716. # Kimwitu++ uses a slightly different magic
  2717. 0    string        A#S#C#S#S#L#HUB        Kimwitu++ data
  2718.  
  2719. # From "Simon Hosie
  2720. 0       string  TFMX-SONG       TFMX module sound data
  2721.  
  2722. # Monkey's Audio compressed audio format (.ape)
  2723. # From danny.milo@gmx.net (Danny Milosavljevic)
  2724. # New version from Abel Cheung <abel (@) oaka.org>
  2725. 0        string        MAC\040        Monkey's Audio compressed format
  2726. >4        uleshort    >0x0F8B        version %d
  2727. >>(0x08.l)    uleshort    =1000        with fast compression
  2728. >>(0x08.l)    uleshort    =2000        with normal compression
  2729. >>(0x08.l)    uleshort    =3000        with high compression
  2730. >>(0x08.l)    uleshort    =4000        with extra high compression
  2731. >>(0x08.l)    uleshort    =5000        with insane compression
  2732. >>(0x08.l+18)    uleshort    =1        \b, mono
  2733. >>(0x08.l+18)    uleshort    =2        \b, stereo
  2734. >>(0x08.l+20)    ulelong        x        \b, sample rate %d
  2735. >4        uleshort    <0x0F8C        version %d
  2736. >>6        uleshort    =1000        with fast compression
  2737. >>6        uleshort    =2000        with normal compression
  2738. >>6        uleshort    =3000        with high compression
  2739. >>6        uleshort    =4000        with extra high compression
  2740. >>6        uleshort    =5000        with insane compression
  2741. >>10        uleshort    =1        \b, mono
  2742. >>10        uleshort    =2        \b, stereo
  2743. >>12        ulelong        x        \b, sample rate %d
  2744.  
  2745. # adlib sound files
  2746. # From G├╝rkan Seng├╝n <gurkan@linuks.mine.nu>, http://www.linuks.mine.nu
  2747. 0        string        RAWADATA    RdosPlay RAW
  2748.  
  2749. 1068    string        RoR        AMUSIC Adlib Tracker
  2750.  
  2751. 0    string        JCH        EdLib
  2752.  
  2753. 0    string        mpu401tr    MPU-401 Trakker
  2754.  
  2755. 0    string        SAdT        Surprise! Adlib Tracker
  2756. >4    byte        x        Version %d
  2757.  
  2758. 0    string        XAD!        eXotic ADlib
  2759.  
  2760. 0    string        ofTAZ!        eXtra Simple Music
  2761.  
  2762. # Spectrum 128 tunes (.ay files).
  2763. # From: Emanuel Haupt <ehaupt@critical.ch>
  2764. 0    string        ZXAYEMUL    Spectrum 128 tune
  2765.  
  2766. 0    string        \0BONK        BONK,
  2767. #>5    byte        x        version %d
  2768. >14    byte        x        %d channel(s),
  2769. >15    byte        =1        lossless,
  2770. >15    byte        =0        lossy,
  2771. >16    byte        x        mid-side
  2772.  
  2773. 384    string        LockStream    LockStream Embedded file (mostly MP3 on old Nokia phones)
  2774.  
  2775. # format VQF (proprietary codec for sound)
  2776. # some infos on the header file available at :
  2777. # http://www.twinvq.org/english/technology_format.html
  2778. 0    string        TWIN97012000    VQF data
  2779. >27    short        0        \b, Mono
  2780. >27    short        1        \b, Stereo
  2781. >31    short         >0        \b, %d kbit/s
  2782. >35    short         >0        \b, %d kHz
  2783.  
  2784. # Nelson A. de Oliveira (naoliv@gmail.com)
  2785. # .eqf
  2786. 0    string    Winamp\ EQ\ library\ file    %s
  2787. # it will match only versions like v<digit>.<digit>
  2788. # Since I saw only eqf files with version v1.1 I think that it's OK
  2789. >23    string    x    \b%.4s
  2790. # .preset
  2791. 0    string    [Equalizer\ preset]    XMMS equalizer preset
  2792. # .m3u
  2793. 0    search/1    #EXTM3U     M3U playlist text
  2794. # .pls
  2795. 0    search/1    [playlist]    PLS playlist text
  2796. # licq.conf
  2797. 1    string    [licq]            LICQ configuration file
  2798.  
  2799. # Atari ST audio files by Dirk Jagdmann <doj@cubic.org>
  2800. 0    string        ICE!        SNDH Atari ST music
  2801. 0    string        SC68\ Music-file\ /\ (c)\ (BeN)jami    sc68 Atari ST music
  2802.  
  2803. # musepak support From: "Jiri Pejchal" <jiri.pejchal@gmail.com>
  2804. 0       string          MP+     Musepack audio
  2805. >3      byte            255     \b, SV pre8
  2806. >3      byte&0xF        0x6     \b, SV 6
  2807. >3      byte&0xF        0x8     \b, SV 8
  2808. >3      byte&0xF        0x7     \b, SV 7
  2809. >>3     byte&0xF0       0x0     \b.0
  2810. >>3     byte&0xF0       0x10    \b.1
  2811. >>3     byte&0xF0       240     \b.15
  2812. >>10    byte&0xF0       0x0     \b, no profile
  2813. >>10    byte&0xF0       0x10    \b, profile 'Unstable/Experimental'
  2814. >>10    byte&0xF0       0x50    \b, quality 0
  2815. >>10    byte&0xF0       0x60    \b, quality 1
  2816. >>10    byte&0xF0       0x70    \b, quality 2 (Telephone)
  2817. >>10    byte&0xF0       0x80    \b, quality 3 (Thumb)
  2818. >>10    byte&0xF0       0x90    \b, quality 4 (Radio)
  2819. >>10    byte&0xF0       0xA0    \b, quality 5 (Standard)
  2820. >>10    byte&0xF0       0xB0    \b, quality 6 (Xtreme)
  2821. >>10    byte&0xF0       0xC0    \b, quality 7 (Insane)
  2822. >>10    byte&0xF0       0xD0    \b, quality 8 (BrainDead)
  2823. >>10    byte&0xF0       0xE0    \b, quality 9
  2824. >>10    byte&0xF0       0xF0    \b, quality 10
  2825. >>27    byte            0x0     \b, Buschmann 1.7.0-9, Klemm 0.90-1.05
  2826. >>27    byte            102     \b, Beta 1.02
  2827. >>27    byte            104     \b, Beta 1.04
  2828. >>27    byte            105     \b, Alpha 1.05
  2829. >>27    byte            106     \b, Beta 1.06
  2830. >>27    byte            110     \b, Release 1.1
  2831. >>27    byte            111     \b, Alpha 1.11
  2832. >>27    byte            112     \b, Beta 1.12
  2833. >>27    byte            113     \b, Alpha 1.13
  2834. >>27    byte            114     \b, Beta 1.14
  2835. >>27    byte            115     \b, Alpha 1.15
  2836.  
  2837. # IMY
  2838. # from http://filext.com/detaillist.php?extdetail=IMY
  2839. # http://cellphones.about.com/od/cellularfaqs/f/rf_imelody.htm
  2840. # http://download.ncl.ie/doc/api/ie/ncl/media/music/IMelody.html
  2841. # http://www.wx800.com/msg/download/irda/iMelody.pdf
  2842. 0    string    BEGIN:IMELODY    iMelody Ringtone Format
  2843.  
  2844. # From: "Mateus Caruccio" <mateus@caruccio.com>
  2845. # guitar pro v3,4,5 from http://filext.com/file-extension/gp3
  2846. 0    string    \030FICHIER\ GUITAR\ PRO\ v3.    Guitar Pro Ver. 3 Tablature
  2847.  
  2848. # From: "Leslie P. Polzer" <leslie.polzer@gmx.net>
  2849. 60    string    SONG        SoundFX Module sound file
  2850.  
  2851. # Type: Adaptive Multi-Rate Codec
  2852. # URL:  http://filext.com/detaillist.php?extdetail=AMR
  2853. # From: Russell Coker <russell@coker.com.au>
  2854. 0    string    #!AMR        Adaptive Multi-Rate Codec (GSM telephony)
  2855.  
  2856. # Type: SuperCollider 3 Synth Definition File Format
  2857. # From: Mario Lang <mlang@debian.org>
  2858. 0    string    SCgf    SuperCollider3 Synth Definition file,
  2859. >4    belong    x    version %d
  2860. #----------------------------------------------------------------
  2861. # basis: file(1) magic for BBx/Pro5-files
  2862. #      Oliver Dammer <dammer@olida.de>     2005/11/07
  2863. # http://www.basis.com business-basic-files.
  2864. #
  2865. 0    string        \074\074bbx\076\076    BBx
  2866. >7    string        \000            indexed file
  2867. >7    string        \001            serial file
  2868. >7    string        \002            keyed file
  2869. >>13    short        0            (sort)
  2870. >7    string        \004            program
  2871. >>18    byte        x            (LEVEL %d)
  2872. >>>23    string        >\000            psaved
  2873. >7    string        \006            mkeyed file
  2874. >>13    short        0            (sort)
  2875. >>8    string        \000            (mkey)
  2876. #------------------------------------------------------------------------------
  2877. # bFLT: file(1) magic for BFLT uclinux binary files
  2878. #
  2879. # From Philippe De Muyter <phdm@macqel.be>
  2880. #
  2881. 0    string        bFLT        BFLT executable
  2882. >4    belong        x        - version %ld
  2883. >4    belong        4
  2884. >>36    belong&0x1    0x1        ram
  2885. >>36    belong&0x2    0x2        gotpic
  2886. >>36    belong&0x4    0x4        gzip
  2887. >>36    belong&0x8    0x8        gzdata
  2888. #------------------------------------------------------------------------------
  2889. # blender: file(1) magic for Blender 3D related files
  2890. #
  2891. # Native format rule v1.2. For questions use the developers list 
  2892. # http://lists.blender.org/mailman/listinfo/bf-committers
  2893. # GLOB chunk was moved near start and provides subversion info since 2.42 
  2894.  
  2895. 0        string    =BLENDER    Blender3D,
  2896. >7        string    =_        saved as 32-bits
  2897. >>8        string    =v        little endian
  2898. >>>9        byte    x        with version %c.
  2899. >>>10        byte    x        \b%c
  2900. >>>11        byte    x        \b%c
  2901. >>>0x40        string    =GLOB        \b.
  2902. >>>>0x58    leshort    x        \b%.4d
  2903. >>8        string    =V        big endian
  2904. >>>9        byte    x        with version %c.
  2905. >>>10        byte    x        \b%c
  2906. >>>11        byte    x        \b%c
  2907. >>>0x40        string    =GLOB        \b.
  2908. >>>>0x58    beshort    x        \b%.4d
  2909. >7        string    =-        saved as 64-bits
  2910. >>8        string    =v        little endian
  2911. >>9        byte    x        with version %c.
  2912. >>10        byte    x        \b%c
  2913. >>11        byte    x        \b%c
  2914. >>0x44        string    =GLOB        \b.
  2915. >>>0x60        leshort    x        \b%.4d
  2916. >>8        string    =V        big endian
  2917. >>>9        byte    x        with version %c.
  2918. >>>10        byte    x        \b%c
  2919. >>>11        byte    x        \b%c
  2920. >>>0x44        string    =GLOB        \b.
  2921. >>>>0x60    beshort    x        \b%.4d
  2922.  
  2923. # Scripts that run in the embeded Python interpreter
  2924. 0        string    #!BPY        Blender3D BPython script
  2925.  
  2926. #------------------------------------------------------------------------------
  2927. # blit:  file(1) magic for 68K Blit stuff as seen from 680x0 machine
  2928. #
  2929. # Note that this 0407 conflicts with several other a.out formats...
  2930. #
  2931. # XXX - should this be redone with "be" and "le", so that it works on
  2932. # little-endian machines as well?  If so, what's the deal with
  2933. # "VAX-order" and "VAX-order2"?
  2934. #
  2935. #0    long        0407        68K Blit (standalone) executable
  2936. #0    short        0407        VAX-order2 68K Blit (standalone) executable
  2937. 0    short        03401        VAX-order 68K Blit (standalone) executable
  2938. 0    long        0406        68k Blit mpx/mux executable
  2939. 0    short        0406        VAX-order2 68k Blit mpx/mux executable
  2940. 0    short        03001        VAX-order 68k Blit mpx/mux executable
  2941. # Need more values for WE32 DMD executables.
  2942. # Note that 0520 is the same as COFF
  2943. #0    short        0520        tty630 layers executable
  2944. #
  2945. # i80960 b.out objects and archives
  2946. #
  2947. 0    long        0x10d        i960 b.out relocatable object
  2948. >16    long        >0        not stripped
  2949. #
  2950. # b.out archive (hp-rt on i960)
  2951. 0    string        =!<bout>    b.out archive
  2952. >8    string        __.SYMDEF    random library
  2953. #------------------------------------------------------------------------------
  2954. # bsdi:  file(1) magic for BSD/OS (from BSDI) objects
  2955. #
  2956.  
  2957. 0    lelong        0314        386 compact demand paged pure executable
  2958. >16    lelong        >0        not stripped
  2959. >32    byte        0x6a        (uses shared libs)
  2960.  
  2961. 0    lelong        0407        386 executable
  2962. >16    lelong        >0        not stripped
  2963. >32    byte        0x6a        (uses shared libs)
  2964.  
  2965. 0    lelong        0410        386 pure executable
  2966. >16    lelong        >0        not stripped
  2967. >32    byte        0x6a        (uses shared libs)
  2968.  
  2969. 0    lelong        0413        386 demand paged pure executable
  2970. >16    lelong        >0        not stripped
  2971. >32    byte        0x6a        (uses shared libs)
  2972.  
  2973. # same as in SunOS 4.x, except for static shared libraries
  2974. 0    belong&077777777    0600413        sparc demand paged
  2975. >0    byte        &0x80
  2976. >>20    belong        <4096        shared library
  2977. >>20    belong        =4096        dynamically linked executable
  2978. >>20    belong        >4096        dynamically linked executable
  2979. >0    byte        ^0x80        executable
  2980. >16    belong        >0        not stripped
  2981. >36    belong        0xb4100001    (uses shared libs)
  2982.  
  2983. 0    belong&077777777    0600410        sparc pure
  2984. >0    byte        &0x80        dynamically linked executable
  2985. >0    byte        ^0x80        executable
  2986. >16    belong        >0        not stripped
  2987. >36    belong        0xb4100001    (uses shared libs)
  2988.  
  2989. 0    belong&077777777    0600407        sparc
  2990. >0    byte        &0x80        dynamically linked executable
  2991. >0    byte        ^0x80        executable
  2992. >16    belong        >0        not stripped
  2993. >36    belong        0xb4100001    (uses shared libs)
  2994. #------------------------------------------------------------------------------
  2995. # BTSnoop:  file(1) magic for BTSnoop files
  2996. #
  2997. # From <marcel@holtmann.org>
  2998. 0    string        btsnoop\0        BTSnoop
  2999. >8    belong        x            version %d,
  3000. >12    belong        1001            Unencapsulated HCI
  3001. >12    belong        1002            HCI UART (H4)
  3002. >12    belong        1003            HCI BCSP
  3003. >12    belong        1004            HCI Serial (H5)
  3004. >>12    belong        x            type %d
  3005. #------------------------------------------------------------------------------
  3006. # c-lang:  file(1) magic for C programs (or REXX)
  3007. #
  3008.  
  3009. # XPM icons (Greg Roelofs, newt@uchicago.edu)
  3010. # if you uncomment "/*" for C/REXX below, also uncomment this entry
  3011. #0    string        /*\ XPM\ */    X pixmap image data
  3012. #!:mime    image/x-xpmi
  3013.  
  3014. # 3DS (3d Studio files) Conflicts with diff output 0x3d '='
  3015. #16    beshort        0x3d3d        image/x-3ds
  3016.  
  3017. # this first will upset you if you're a PL/1 shop...
  3018. # in which case rm it; ascmagic will catch real C programs
  3019. #0    search/1    /*        C or REXX program text
  3020. #0    search/1    //        C++ program text
  3021.  
  3022. # From: Mikhail Teterin <mi@aldan.algebra.com> 
  3023. 0    string        cscope        cscope reference data
  3024. >7    string        x        version %.2s
  3025. # We skip the path here, because it is often long (so file will
  3026. # truncate it) and mostly redundant.
  3027. # The inverted index functionality was added some time betwen
  3028. # versions 11 and 15, so look for -q if version is above 14:
  3029. >7    string        >14
  3030. >>10    search/100    \ -q\         with inverted index
  3031. >10    search/100    \ -c\         text (non-compressed)
  3032. #------------------------------------------------------------------------------
  3033. # c64:  file(1) magic for various commodore 64 related files
  3034. #
  3035. # From: Dirk Jagdmann <doj@cubic.org>
  3036.  
  3037. 0x16500    belong        0x12014100    D64 Image
  3038. 0x16500    belong        0x12014180    D71 Image
  3039. 0x61800 belong        0x28034400    D81 Image
  3040. 0    string        C64\40CARTRIDGE    CCS C64 Emultar Cartridge Image
  3041. 0    belong        0x43154164    X64 Image
  3042.  
  3043. 0    string        GCR-1541    GCR Image
  3044. >8    byte        x        version: %i
  3045. >9    byte        x        tracks: %i
  3046.  
  3047. 9    string        PSUR        ARC archive (c64)
  3048. 2    string        -LH1-        LHA archive (c64)
  3049.  
  3050. 0    string        C64File        PC64 Emulator file
  3051. >8    string        >\0        "%s"
  3052. 0    string        C64Image    PC64 Freezer Image
  3053.  
  3054. 0    beshort        0x38CD        C64 PCLink Image
  3055. 0    string        CBM\144\0\0    Power 64 C64 Emulator Snapshot
  3056.  
  3057. 0    belong        0xFF424CFF    WRAptor packer (c64)
  3058.  
  3059. 0    string        C64S\x20tape\x20file    T64 tape Image
  3060. >32    leshort        x        Version:0x%x
  3061. >36    leshort        !0        Entries:%i
  3062. >40    string        x        Name:%.24s
  3063.  
  3064. 0    string        C64\x20tape\x20image\x20file\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0    T64 tape Image
  3065. >32    leshort        x        Version:0x%x
  3066. >36    leshort        !0        Entries:%i
  3067. >40    string        x        Name:%.24s
  3068.  
  3069. 0    string        C64S\x20tape\x20image\x20file\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0    T64 tape Image
  3070. >32    leshort        x        Version:0x%x
  3071. >36    leshort        !0        Entries:%i
  3072. >40    string        x        Name:%.24s
  3073.  
  3074. #------------------------------------------------------------------------------
  3075. # autocad:  file(1) magic for cad files
  3076. #
  3077.  
  3078. # AutoCAD DWG versions R13/R14 (www.autodesk.com)
  3079. # Written December 01, 2003 by Lester Hightower
  3080. # Based on the DWG File Format Specifications at http://www.opendwg.org/
  3081. 0    string           \101\103\061\060\061           AutoCAD
  3082. >5    string           \062\000\000\000\000           DWG ver. R13
  3083. >5    string           \064\000\000\000\000           DWG ver. R14
  3084.  
  3085. # Microstation DGN/CIT Files (www.bentley.com)
  3086. # Last updated July 29, 2005 by Lester Hightower
  3087. # DGN is the default file extension of Microstation/Intergraph CAD files.
  3088. # CIT is the proprietary raster format (similar to TIFF) used to attach
  3089. # raster underlays to Microstation DGN (vector) drawings.
  3090. # http://www.wotsit.org/search.asp
  3091. # http://filext.com/detaillist.php?extdetail=DGN
  3092. # http://filext.com/detaillist.php?extdetail=CIT
  3093. #
  3094. # http://www.bentley.com/products/default.cfm?objectid=97F351F5-9C35-4E5E-89C2
  3095. # 3F86C928&method=display&p_objectid=97F351F5-9C35-4E5E-89C280A93F86C928
  3096. # http://www.bentley.com/products/default.cfm?objectid=A5C2FD43-3AC9-4C71-B682
  3097. # 721C479F&method=display&p_objectid=A5C2FD43-3AC9-4C71-B682C7BE721C479F
  3098. 0    string    \010\011\376            Microstation
  3099. >3    string    \002
  3100. >>30    string    \026\105            DGNFile
  3101. >>30    string    \034\105            DGNFile
  3102. >>30    string    \073\107            DGNFile
  3103. >>30    string    \073\110            DGNFile
  3104. >>30    string    \106\107            DGNFile
  3105. >>30    string    \110\103            DGNFile
  3106. >>30    string    \120\104            DGNFile
  3107. >>30    string    \172\104            DGNFile
  3108. >>30    string    \172\105            DGNFile
  3109. >>30    string    \172\106            DGNFile
  3110. >>30    string    \234\106            DGNFile
  3111. >>30    string    \273\105            DGNFile
  3112. >>30    string    \306\106            DGNFile
  3113. >>30    string    \310\104            DGNFile
  3114. >>30    string    \341\104            DGNFile
  3115. >>30    string    \372\103            DGNFile
  3116. >>30    string    \372\104            DGNFile
  3117. >>30    string    \372\106            DGNFile
  3118. >>30    string    \376\103            DGNFile
  3119. >4    string    \030\000\000            CITFile
  3120. >4    string    \030\000\003            CITFile
  3121.  
  3122. # AutoCad, from Nahuel Greco
  3123. # AutoCAD DWG versions R12/R13/R14 (www.autodesk.com)
  3124. 0    string AC1012    AutoCad (release 12)
  3125. 0    string AC1013    AutoCad (release 13)
  3126. 0    string AC1014    AutoCad (release 14)
  3127.  
  3128. # CAD: file(1) magic for computer aided design files
  3129. # Phillip Griffith <phillip dot griffith at gmail dot com>
  3130. # AutoCAD magic taken from the Open Design Alliance's OpenDWG specifications.
  3131. #
  3132. 0    belong    0x08051700    Bentley/Intergraph MicroStation DGN cell library
  3133. 0    belong    0x0809fe02    Bentley/Intergraph MicroStation DGN vector CAD
  3134. 0    belong    0xc809fe02    Bentley/Intergraph MicroStation DGN vector CAD
  3135. 0    beshort    0x0809        Bentley/Intergraph MicroStation
  3136. >0x02    byte    0xfe
  3137. >>0x04    beshort    0x1800        CIT raster CAD
  3138. 0    string    AC1012        AutoDesk AutoCAD R13
  3139. 0    string    AC1014        AutoDesk AutoCAD R14 
  3140. 0    string    AC1015        AutoDesk AutoCAD R2000
  3141. #------------------------------------------------------------------------------
  3142. # Cafe Babes unite!
  3143. #
  3144. # Since Java bytecode and Mach-O fat-files have the same magic number, the test
  3145. # must be performed in the same "magic" sequence to get both right.  The long
  3146. # at offset 4 in a mach-O fat file tells the number of architectures; the short at
  3147. # offset 4 in a Java bytecode file is the JVM minor version and the
  3148. # short at offset 6 is the JVM major version.  Since there are only 
  3149. # only 18 labeled Mach-O architectures at current, and the first released 
  3150. # Java class format was version 43.0, we can safely choose any number
  3151. # between 18 and 39 to test the number of architectures against
  3152. # (and use as a hack). Let's not use 18, because the Mach-O people
  3153. # might add another one or two as time goes by...
  3154. #
  3155. 0    beshort        0xcafe
  3156. >2    beshort         0xbabe
  3157. !:mime    application/x-java-applet
  3158. >>2    belong        >30        compiled Java class data,
  3159. >>>6    beshort        x            version %d.
  3160. >>>4    beshort        x           \b%d
  3161. >>4    belong        1        Mach-O fat file with 1 architecture
  3162. >>4    belong        >1
  3163. >>>4    belong        <20        Mach-O fat file with %ld architectures
  3164. >2    beshort        0xd00d        JAR compressed with pack200
  3165. !:mime    application/x-java-pack200
  3166. #------------------------------------------------------------------------------
  3167. # CDDB: file(1) magic for CDDB(tm) format CD text data files
  3168. #
  3169. # From <steve@gracenote.com>
  3170. #
  3171. # This is the /etc/magic entry to decode datafiles as used by
  3172. # CDDB-enabled CD player applications.
  3173. #
  3174.  
  3175. 0    search/1/b    #\040xmcd    CDDB(tm) format CD text data
  3176.  
  3177. #------------------------------------------------------------------------------
  3178. # chord: file(1) magic for Chord music sheet typesetting utility input files
  3179. #
  3180. # From Philippe De Muyter <phdm@macqel.be>
  3181. # File format is actually free, but many distributed files begin with `{title'
  3182. #
  3183. 0    string        {title        Chord text file
  3184.  
  3185. # Type:    PowerTab file format
  3186. # URL:    http://www.power-tab.net/
  3187. # From:    Jelmer Vernooij <jelmer@samba.org>
  3188. 0    string        ptab\003\000    Power-Tab v3 Tablature File
  3189. 0    string        ptab\004\000    Power-Tab v4 Tablature File
  3190. #------------------------------------------------------------------------------
  3191. # cisco:  file(1) magic for cisco Systems routers
  3192. #
  3193. # Most cisco file-formats are covered by the generic elf code
  3194. #
  3195. # Microcode files are non-ELF, 0x8501 conflicts with NetBSD/alpha.
  3196. 0    belong&0xffffff00    0x85011400  cisco IOS microcode
  3197. >7    string        >\0            for '%s'
  3198. 0    belong&0xffffff00    0x8501cb00  cisco IOS experimental microcode
  3199. >7    string        >\0            for '%s'
  3200. #------------------------------------------------------------------------------
  3201. # citrus locale declaration
  3202. #
  3203.  
  3204. 0    string        RuneCT        Citrus locale declaration for LC_CTYPE
  3205.  
  3206.  
  3207. #------------------------------------------------------------------------------
  3208. # clarion:  file(1) magic for # Clarion Personal/Professional Developer
  3209. # (v2 and above)
  3210. # From: Julien Blache <jb@jblache.org>
  3211.  
  3212. # Database files
  3213. # signature
  3214. 0    leshort    0x3343    Clarion Developer (v2 and above) data file
  3215. # attributes
  3216. >2    leshort    &0x0001    \b, locked
  3217. >2    leshort    &0x0004    \b, encrypted
  3218. >2    leshort    &0x0008    \b, memo file exists
  3219. >2    leshort    &0x0010    \b, compressed
  3220. >2    leshort    &0x0040    \b, read only
  3221. # number of records
  3222. >5    lelong    x    \b, %ld records
  3223.  
  3224. # Memo files
  3225. 0    leshort    0x334d    Clarion Developer (v2 and above) memo data
  3226.  
  3227. # Key/Index files
  3228. # No magic? :(
  3229.  
  3230. # Help files
  3231. 0    leshort    0x49e0    Clarion Developer (v2 and above) help data
  3232.  
  3233. #------------------------------------------------------------------------------
  3234. # claris:  file(1) magic for claris
  3235. # "H. Nanosecond" <aldomel@ix.netcom.com>
  3236. # Claris Works a word processor, etc.
  3237. # Version 3.0
  3238.  
  3239. # .pct claris works clip art files
  3240. #0000000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
  3241. #*
  3242. #0001000 #010 250 377 377 377 377 000 213 000 230 000 021 002 377 014 000
  3243. #null to byte 1000 octal
  3244. 514    string    \377\377\377\377\000    Claris clip art?
  3245. >0    string    \0\0\0\0\0\0\0\0\0\0\0\0\0    yes.
  3246. 514    string    \377\377\377\377\001    Claris clip art?
  3247. >0    string    \0\0\0\0\0\0\0\0\0\0\0\0\0    yes.
  3248.  
  3249. # Claris works files
  3250. # .cwk
  3251. 0    string    \002\000\210\003\102\117\102\117\000\001\206 Claris works document
  3252. # .plt
  3253. 0    string    \020\341\000\000\010\010    Claris Works pallete files .plt
  3254.  
  3255. # .msp a dictionary file I am not sure about this I have only one .msp file
  3256. 0    string    \002\271\262\000\040\002\000\164    Claris works dictionary
  3257.  
  3258. # .usp are user dictionary bits
  3259. # I am not sure about a magic header:
  3260. #0000000 001 123 160 146 070 125 104 040 136 123 015 012 160 157 144 151
  3261. #        soh   S   p   f   8   U   D  sp   ^   S  cr  nl   p   o   d   i
  3262. #0000020 141 164 162 151 163 164 040 136 123 015 012 144 151 166 040 043
  3263. #          a   t   r   i   s   t  sp   ^   S  cr  nl   d   i   v  sp   #
  3264.  
  3265. # .mth Thesaurus
  3266. # starts with \0 but no magic header
  3267.  
  3268. # .chy Hyphenation file
  3269. # I am not sure: 000 210 034 000 000
  3270.  
  3271. # other claris files
  3272. #./windows/claris/useng.ndx: data
  3273. #./windows/claris/xtndtran.l32: data
  3274. #./windows/claris/xtndtran.lst: data
  3275. #./windows/claris/clworks.lbl: data
  3276. #./windows/claris/clworks.prf: data
  3277. #./windows/claris/userd.spl: data
  3278.  
  3279. #------------------------------------------------------------------------------
  3280. # clipper:  file(1) magic for Intergraph (formerly Fairchild) Clipper.
  3281. #
  3282. # XXX - what byte order does the Clipper use?
  3283. #
  3284. # XXX - what's the "!" stuff:
  3285. #
  3286. # >18    short        !074000,000000    C1 R1 
  3287. # >18    short        !074000,004000    C2 R1
  3288. # >18    short        !074000,010000    C3 R1
  3289. # >18    short        !074000,074000    TEST
  3290. #
  3291. # I shall assume it's ANDing the field with the first value and
  3292. # comparing it with the second, and rewrite it as:
  3293. #
  3294. # >18    short&074000    000000        C1 R1 
  3295. # >18    short&074000    004000        C2 R1
  3296. # >18    short&074000    010000        C3 R1
  3297. # >18    short&074000    074000        TEST
  3298. #
  3299. # as SVR3.1's "file" doesn't support anything of the "!074000,000000"
  3300. # sort, nor does SunOS 4.x, so either it's something Intergraph added
  3301. # in CLIX, or something AT&T added in SVR3.2 or later, or something
  3302. # somebody else thought was a good idea; it's not documented in the
  3303. # man page for this version of "magic", nor does it appear to be
  3304. # implemented (at least not after I blew off the bogus code to turn
  3305. # old-style "&"s into new-style "&"s, which just didn't work at all).
  3306. #
  3307. 0    short        0575        CLIPPER COFF executable (VAX #)
  3308. >20    short        0407        (impure)
  3309. >20    short        0410        (5.2 compatible)
  3310. >20    short        0411        (pure)
  3311. >20    short        0413        (demand paged)
  3312. >20    short        0443        (target shared library)
  3313. >12    long        >0        not stripped
  3314. >22    short        >0        - version %ld
  3315. 0    short        0577        CLIPPER COFF executable
  3316. >18    short&074000    000000        C1 R1 
  3317. >18    short&074000    004000        C2 R1
  3318. >18    short&074000    010000        C3 R1
  3319. >18    short&074000    074000        TEST
  3320. >20    short        0407        (impure)
  3321. >20    short        0410        (pure)
  3322. >20    short        0411        (separate I&D)
  3323. >20    short        0413        (paged)
  3324. >20    short        0443        (target shared library)
  3325. >12    long        >0        not stripped
  3326. >22    short        >0        - version %ld
  3327. >48    long&01        01        alignment trap enabled
  3328. >52    byte        1        -Ctnc
  3329. >52    byte        2        -Ctsw
  3330. >52    byte        3        -Ctpw
  3331. >52    byte        4        -Ctcb
  3332. >53    byte        1        -Cdnc
  3333. >53    byte        2        -Cdsw
  3334. >53    byte        3        -Cdpw
  3335. >53    byte        4        -Cdcb
  3336. >54    byte        1        -Csnc
  3337. >54    byte        2        -Cssw
  3338. >54    byte        3        -Cspw
  3339. >54    byte        4        -Cscb
  3340. 4    string        pipe        CLIPPER instruction trace
  3341. 4    string        prof        CLIPPER instruction profile
  3342.  
  3343. #------------------------------------------------------------------------------
  3344. # commands:  file(1) magic for various shells and interpreters
  3345. #
  3346. #0    string        :            shell archive or script for antique kernel text
  3347. 0    string/b    #!\ /bin/sh        POSIX shell script text executable
  3348. !:mime    application/x-shellscript
  3349. 0    string/b    #!\ /bin/csh        C shell script text executable
  3350. !:mime    application/x-shellscript
  3351. # korn shell magic, sent by George Wu, gwu@clyde.att.com
  3352. 0    string/b    #!\ /bin/ksh        Korn shell script text executable
  3353. !:mime    application/x-shellscript
  3354. 0    string/b     #!\ /bin/tcsh        Tenex C shell script text executable
  3355. !:mime    application/x-shellscript
  3356. 0    string/b    #!\ /usr/bin/tcsh    Tenex C shell script text executable
  3357. !:mime application/x-shellscript
  3358. 0    string/b     #!\ /usr/local/tcsh    Tenex C shell script text executable
  3359. !:mime    application/x-shellscript
  3360. 0    string/b    #!\ /usr/local/bin/tcsh    Tenex C shell script text executable
  3361. !:mime    application/x-shellscript
  3362.  
  3363. #
  3364. # zsh/ash/ae/nawk/gawk magic from cameron@cs.unsw.oz.au (Cameron Simpson)
  3365. 0    string/b    #!\ /bin/zsh        Paul Falstad's zsh script text executable
  3366. !:mime    application/x-shellscript
  3367. 0    string/b    #!\ /usr/bin/zsh    Paul Falstad's zsh script text executable
  3368. !:mime    application/x-shellscript
  3369. 0    string/b    #!\ /usr/local/bin/zsh    Paul Falstad's zsh script text executable
  3370. !:mime    application/x-shellscript
  3371. 0    string/b    #!\ /usr/local/bin/ash    Neil Brown's ash script text executable
  3372. !:mime    application/x-shellscript
  3373. 0    string/b    #!\ /usr/local/bin/ae    Neil Brown's ae script text executable
  3374. !:mime    application/x-shellscript
  3375. 0    string/b    #!\ /bin/nawk        new awk script text executable
  3376. !:mime    application/x-nawk
  3377. 0    string/b    #!\ /usr/bin/nawk    new awk script text executable
  3378. !:mime    application/x-nawk
  3379. 0    string/b    #!\ /usr/local/bin/nawk    new awk script text executable
  3380. !:mime    application/x-nawk
  3381. 0    string/b    #!\ /bin/gawk        GNU awk script text executable
  3382. !:mime    application/x-gawk
  3383. 0    string/b    #!\ /usr/bin/gawk    GNU awk script text executable
  3384. !:mime    application/x-gawk
  3385. 0    string/b    #!\ /usr/local/bin/gawk    GNU awk script text executable
  3386. !:mime    application/x-gawk
  3387. #
  3388. 0    string/b    #!\ /bin/awk        awk script text executable
  3389. !:mime    application/x-awk
  3390. 0    string/b    #!\ /usr/bin/awk    awk script text executable
  3391. !:mime    application/x-awk
  3392. # update to distinguish from *.vcf files
  3393. # this is broken because postscript has /EBEGIN{ for example.
  3394. #0    search/Bb    BEGIN {            awk script text
  3395. 0    regex        =^\\s*BEGIN\\s*[{]    awk script text
  3396.  
  3397. # AT&T Bell Labs' Plan 9 shell
  3398. 0    string/b    #!\ /bin/rc    Plan 9 rc shell script text executable
  3399.  
  3400. # bash shell magic, from Peter Tobias (tobias@server.et-inf.fho-emden.de)
  3401. 0    string/b    #!\ /bin/bash    Bourne-Again shell script text executable
  3402. !:mime    application/x-shellscript
  3403. 0    string/b    #!\ /usr/bin/bash    Bourne-Again shell script text executable
  3404. !:mime    application/x-shellscript
  3405. 0    string/b    #!\ /usr/local/bash    Bourne-Again shell script text executable
  3406. !:mime    application/x-shellscript
  3407. 0    string/b    #!\ /usr/local/bin/bash    Bourne-Again shell script text executable
  3408. !:mime    application/x-shellscript
  3409.  
  3410. # using env
  3411. 0    string        #!/usr/bin/env        a
  3412. >15    string        >\0            %s script text executable
  3413. 0    string        #!\ /usr/bin/env    a
  3414. >16    string        >\0            %s script text executable
  3415.  
  3416. # PHP scripts
  3417. # Ulf Harnhammar <ulfh@update.uu.se>
  3418. 0    search/1/c    =<?php            PHP script text
  3419. 0    search/1    =<?\n            PHP script text
  3420. 0    search/1    =<?\r            PHP script text
  3421. 0    search/1/b    #!\ /usr/local/bin/php    PHP script text executable
  3422. 0    search/1/b    #!\ /usr/bin/php    PHP script text executable
  3423.  
  3424. 0    string        Zend\x00        PHP script Zend Optimizer data
  3425.  
  3426. 0    string        $!            DCL command file
  3427.  
  3428. # Type: Pdmenu
  3429. # URL:  http://packages.debian.org/pdmenu
  3430. # From: Edward Betts <edward@debian.org>
  3431. 0    string    #!/usr/bin/pdmenu    Pdmenu configuration file text
  3432.  
  3433. #----------------------------------------------------------------------------
  3434. # communication
  3435.  
  3436. # TTCN is the Tree and Tabular Combined Notation described in ISO 9646-3.
  3437. # It is used for conformance testing of communication protocols.
  3438. # Added by W. Borgert <debacle@debian.org>.
  3439. 0    string        $Suite            TTCN Abstract Test Suite
  3440. >&1    string        $SuiteId
  3441. >>&1    string        >\n            %s
  3442. >&2    string        $SuiteId
  3443. >>&1    string        >\n            %s
  3444. >&3    string        $SuiteId
  3445. >>&1    string        >\n            %s
  3446.  
  3447. # MSC (message sequence charts) are a formal description technique,
  3448. # described in ITU-T Z.120, mainly used for communication protocols.
  3449. # Added by W. Borgert <debacle@debian.org>.
  3450. 0    string        mscdocument    Message Sequence Chart (document)
  3451. 0    string        msc        Message Sequence Chart (chart)
  3452. 0    string        submsc        Message Sequence Chart (subchart)
  3453.  
  3454. #------------------------------------------------------------------------------
  3455. # compress:  file(1) magic for pure-compression formats (no archives)
  3456. #
  3457. # compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc.
  3458. #
  3459. # Formats for various forms of compressed data
  3460. # Formats for "compress" proper have been moved into "compress.c",
  3461. # because it tries to uncompress it to figure out what's inside.
  3462.  
  3463. # standard unix compress
  3464. #0    string        \037\235    compress'd data
  3465. #!:mime    application/x-compress
  3466. >2    byte&0x80    >0        block compressed
  3467. >2    byte&0x1f    x        %d bits
  3468.  
  3469. # gzip (GNU zip, not to be confused with Info-ZIP or PKWARE zip archiver)
  3470. #   Edited by Chris Chittleborough <cchittleborough@yahoo.com.au>, March 2002
  3471. #    * Original filename is only at offset 10 if "extra field" absent
  3472. #    * Produce shorter output - notably, only report compression methods
  3473. #      other than 8 ("deflate", the only method defined in RFC 1952).
  3474. 0       string          \037\213        gzip compressed data
  3475. !:mime    application/x-gzip
  3476. >2    byte        <8        \b, reserved method
  3477. >2    byte        >8        \b, unknown method
  3478. >3    byte        &0x01        \b, ASCII
  3479. >3    byte        &0x02        \b, has CRC
  3480. >3    byte        &0x04        \b, extra field
  3481. >3    byte&0xC    =0x08
  3482. >>10    string        x        \b, was "%s"
  3483. >3    byte        &0x10        \b, has comment
  3484. >9    byte        =0x00        \b, from FAT filesystem (MS-DOS, OS/2, NT)
  3485. >9    byte        =0x01        \b, from Amiga
  3486. >9    byte        =0x02        \b, from VMS
  3487. >9    byte        =0x03        \b, from Unix
  3488. >9    byte        =0x04        \b, from VM/CMS
  3489. >9    byte        =0x05        \b, from Atari
  3490. >9    byte        =0x06        \b, from HPFS filesystem (OS/2, NT)
  3491. >9    byte        =0x07        \b, from MacOS
  3492. >9    byte        =0x08        \b, from Z-System
  3493. >9    byte        =0x09        \b, from CP/M
  3494. >9    byte        =0x0A        \b, from TOPS/20
  3495. >9    byte        =0x0B        \b, from NTFS filesystem (NT)
  3496. >9    byte        =0x0C        \b, from QDOS
  3497. >9    byte        =0x0D        \b, from Acorn RISCOS
  3498. >3    byte        &0x10        \b, comment
  3499. >3    byte        &0x20        \b, encrypted
  3500. >4    ledate        >0        \b, last modified: %s
  3501. >8    byte        2        \b, max compression
  3502. >8    byte        4        \b, max speed
  3503.  
  3504. # packed data, Huffman (minimum redundancy) codes on a byte-by-byte basis
  3505. 0    string        \037\036    packed data
  3506. !:mime    application/octet-stream
  3507. >2    belong        >1        \b, %d characters originally
  3508. >2    belong        =1        \b, %d character originally
  3509. #
  3510. # This magic number is byte-order-independent.
  3511. 0    short        0x1f1f        old packed data
  3512. !:mime    application/octet-stream
  3513.  
  3514. # XXX - why *two* entries for "compacted data", one of which is
  3515. # byte-order independent, and one of which is byte-order dependent?
  3516. #
  3517. 0    short        0x1fff        compacted data
  3518. !:mime    application/octet-stream
  3519. # This string is valid for SunOS (BE) and a matching "short" is listed
  3520. # in the Ultrix (LE) magic file.
  3521. 0    string        \377\037    compacted data
  3522. !:mime    application/octet-stream
  3523. 0    short        0145405        huf output
  3524. !:mime    application/octet-stream
  3525.  
  3526. # bzip2
  3527. 0    string        BZh        bzip2 compressed data
  3528. !:mime    application/x-bzip2
  3529. >3    byte        >47        \b, block size = %c00k
  3530.  
  3531. # squeeze and crunch
  3532. # Michael Haardt <michael@cantor.informatik.rwth-aachen.de>
  3533. 0    beshort        0x76FF        squeezed data,
  3534. >4    string        x        original name %s
  3535. 0    beshort        0x76FE        crunched data,
  3536. >2    string        x        original name %s
  3537. 0    beshort        0x76FD        LZH compressed data,
  3538. >2    string        x        original name %s
  3539.  
  3540. # Freeze
  3541. 0    string        \037\237    frozen file 2.1
  3542. 0    string        \037\236    frozen file 1.0 (or gzip 0.5)
  3543.  
  3544. # SCO compress -H (LZH)
  3545. 0    string        \037\240    SCO compress -H (LZH) data
  3546.  
  3547. # European GSM 06.10 is a provisional standard for full-rate speech
  3548. # transcoding, prI-ETS 300 036, which uses RPE/LTP (residual pulse
  3549. # excitation/long term prediction) coding at 13 kbit/s.
  3550. #
  3551. # There's only a magic nibble (4 bits); that nibble repeats every 33
  3552. # bytes.  This isn't suited for use, but maybe we can use it someday.
  3553. #
  3554. # This will cause very short GSM files to be declared as data and
  3555. # mismatches to be declared as data too!
  3556. #0    byte&0xF0    0xd0        data
  3557. #>33    byte&0xF0    0xd0
  3558. #>66    byte&0xF0    0xd0
  3559. #>99    byte&0xF0    0xd0
  3560. #>132    byte&0xF0    0xd0        GSM 06.10 compressed audio
  3561.  
  3562. # bzip    a block-sorting file compressor
  3563. #    by Julian Seward <sewardj@cs.man.ac.uk> and others
  3564. #
  3565. #0    string        BZ        bzip compressed data
  3566. #>2    byte        x        \b, version: %c
  3567. #>3    string        =1        \b, compression block size 100k
  3568. #>3    string        =2        \b, compression block size 200k
  3569. #>3    string        =3        \b, compression block size 300k
  3570. #>3    string        =4        \b, compression block size 400k
  3571. #>3    string        =5        \b, compression block size 500k
  3572. #>3    string        =6        \b, compression block size 600k
  3573. #>3    string        =7        \b, compression block size 700k
  3574. #>3    string        =8        \b, compression block size 800k
  3575. #>3    string        =9        \b, compression block size 900k
  3576.  
  3577. # lzop from <markus.oberhumer@jk.uni-linz.ac.at>
  3578. 0    string        \x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a    lzop compressed data
  3579. >9    beshort        <0x0940
  3580. >>9    byte&0xf0    =0x00        - version 0.
  3581. >>9    beshort&0x0fff    x        \b%03x,
  3582. >>13    byte        1        LZO1X-1,
  3583. >>13    byte        2        LZO1X-1(15),
  3584. >>13    byte        3        LZO1X-999,
  3585. ## >>22    bedate        >0        last modified: %s,
  3586. >>14    byte        =0x00        os: MS-DOS
  3587. >>14    byte        =0x01        os: Amiga
  3588. >>14    byte        =0x02        os: VMS
  3589. >>14    byte        =0x03        os: Unix
  3590. >>14    byte        =0x05        os: Atari
  3591. >>14    byte        =0x06        os: OS/2
  3592. >>14    byte        =0x07        os: MacOS
  3593. >>14    byte        =0x0A        os: Tops/20
  3594. >>14    byte        =0x0B        os: WinNT
  3595. >>14    byte        =0x0E        os: Win32
  3596. >9    beshort        >0x0939
  3597. >>9    byte&0xf0    =0x00        - version 0.
  3598. >>9    byte&0xf0    =0x10        - version 1.
  3599. >>9    byte&0xf0    =0x20        - version 2.
  3600. >>9    beshort&0x0fff    x        \b%03x,
  3601. >>15    byte        1        LZO1X-1,
  3602. >>15    byte        2        LZO1X-1(15),
  3603. >>15    byte        3        LZO1X-999,
  3604. ## >>25    bedate        >0        last modified: %s,
  3605. >>17    byte        =0x00        os: MS-DOS
  3606. >>17    byte        =0x01        os: Amiga
  3607. >>17    byte        =0x02        os: VMS
  3608. >>17    byte        =0x03        os: Unix
  3609. >>17    byte        =0x05        os: Atari
  3610. >>17    byte        =0x06        os: OS/2
  3611. >>17    byte        =0x07        os: MacOS
  3612. >>17    byte        =0x0A        os: Tops/20
  3613. >>17    byte        =0x0B        os: WinNT
  3614. >>17    byte        =0x0E        os: Win32
  3615.  
  3616. # 4.3BSD-Quasijarus Strong Compression
  3617. # http://minnie.tuhs.org/Quasijarus/compress.html
  3618. 0    string        \037\241    Quasijarus strong compressed data
  3619.  
  3620. # From: Cory Dikkers <cdikkers@swbell.net>
  3621. 0    string        XPKF        Amiga xpkf.library compressed data
  3622. 0    string        PP11        Power Packer 1.1 compressed data
  3623. 0    string        PP20        Power Packer 2.0 compressed data,
  3624. >4    belong        0x09090909    fast compression
  3625. >4    belong        0x090A0A0A    mediocre compression
  3626. >4    belong        0x090A0B0B    good compression
  3627. >4    belong        0x090A0C0C    very good compression
  3628. >4    belong        0x090A0C0D    best compression
  3629.  
  3630. # 7-zip archiver, from Thomas Klausner (wiz@danbala.tuwien.ac.at)
  3631. # http://www.7-zip.org or DOC/7zFormat.txt 
  3632. #
  3633. 0    string        7z\274\257\047\034    7-zip archive data,
  3634. >6    byte        x            version %d
  3635. >7    byte        x            \b.%d
  3636.  
  3637. # Type: LZMA
  3638. # URL:  http://www.7-zip.org/sdk.html
  3639. # From: Robert Millan <rmh@aybabtu.com> and Reuben Thomas <rrt@sc3d.org>
  3640. # Commented out because apparently not reliable (according to Debian
  3641. # bug #364260)
  3642. #0    string        ]\000\000\200\000    LZMA compressed data
  3643.  
  3644. # AFX compressed files (Wolfram Kleff)
  3645. 2    string        -afx-        AFX compressed file data
  3646.  
  3647. # Supplementary magic data for the file(1) command to support
  3648. # rzip(1).  The format is described in magic(5).
  3649. #
  3650. # Copyright (C) 2003 by Andrew Tridgell.  You may do whatever you want with
  3651. # this file.
  3652. #
  3653. 0    string        RZIP        rzip compressed data
  3654. >4    byte        x        - version %d
  3655. >5    byte        x        \b.%d
  3656. >6    belong        x        (%d bytes)
  3657. #------------------------------------------------------------------------------
  3658. # Console game magic
  3659. # Toby Deshane <hac@shoelace.digivill.net>
  3660. #    ines:  file(1) magic for Marat's iNES Nintendo Entertainment System
  3661. #           ROM dump format
  3662.  
  3663. 0 string NES\032 iNES ROM dump,
  3664. >4 byte  x     %dx16k PRG
  3665. >5 byte  x     \b, %dx8k CHR
  3666. >6 byte&0x01  =0x1  \b, [Vert.]
  3667. >6 byte&0x01  =0x0  \b, [Horiz.]
  3668. >6 byte&0x02  =0x2  \b, [SRAM]
  3669. >6 byte&0x04  =0x4  \b, [Trainer]
  3670. >6 byte&0x04  =0x8  \b, [4-Scr]
  3671.  
  3672. #------------------------------------------------------------------------------
  3673. # gameboy:  file(1) magic for the Nintendo (Color) Gameboy raw ROM format
  3674. #
  3675. 0x104 belong 0xCEED6666 Gameboy ROM:
  3676. >0x134 string >\0 "%.16s"
  3677. >0x146 byte 0x03  \b,[SGB]
  3678. >0x147 byte 0x00  \b, [ROM ONLY]
  3679. >0x147 byte 0x01  \b, [ROM+MBC1]
  3680. >0x147 byte 0x02  \b, [ROM+MBC1+RAM]
  3681. >0x147 byte 0x03  \b, [ROM+MBC1+RAM+BATT]
  3682. >0x147 byte 0x05  \b, [ROM+MBC2]
  3683. >0x147 byte 0x06  \b, [ROM+MBC2+BATTERY]
  3684. >0x147 byte 0x08  \b, [ROM+RAM]
  3685. >0x147 byte 0x09  \b, [ROM+RAM+BATTERY]
  3686. >0x147 byte 0x0B  \b, [ROM+MMM01]
  3687. >0x147 byte 0x0C  \b, [ROM+MMM01+SRAM]
  3688. >0x147 byte 0x0D  \b, [ROM+MMM01+SRAM+BATT]
  3689. >0x147 byte 0x0F  \b, [ROM+MBC3+TIMER+BATT]
  3690. >0x147 byte 0x10  \b, [ROM+MBC3+TIMER+RAM+BATT]
  3691. >0x147 byte 0x11  \b, [ROM+MBC3]
  3692. >0x147 byte 0x12  \b, [ROM+MBC3+RAM]
  3693. >0x147 byte 0x13  \b, [ROM+MBC3+RAM+BATT]
  3694. >0x147 byte 0x19  \b, [ROM+MBC5]
  3695. >0x147 byte 0x1A  \b, [ROM+MBC5+RAM]
  3696. >0x147 byte 0x1B  \b, [ROM+MBC5+RAM+BATT]
  3697. >0x147 byte 0x1C  \b, [ROM+MBC5+RUMBLE]
  3698. >0x147 byte 0x1D  \b, [ROM+MBC5+RUMBLE+SRAM]
  3699. >0x147 byte 0x1E  \b, [ROM+MBC5+RUMBLE+SRAM+BATT]
  3700. >0x147 byte 0x1F  \b, [Pocket Camera]
  3701. >0x147 byte 0xFD  \b, [Bandai TAMA5]
  3702. >0x147 byte 0xFE  \b, [Hudson HuC-3]
  3703. >0x147 byte 0xFF  \b, [Hudson HuC-1]
  3704.  
  3705. >0x148 byte 0     \b, ROM: 256Kbit
  3706. >0x148 byte 1     \b, ROM: 512Kbit
  3707. >0x148 byte 2     \b, ROM: 1Mbit
  3708. >0x148 byte 3     \b, ROM: 2Mbit
  3709. >0x148 byte 4     \b, ROM: 4Mbit
  3710. >0x148 byte 5     \b, ROM: 8Mbit
  3711. >0x148 byte 6     \b, ROM: 16Mbit
  3712. >0x148 byte 0x52  \b, ROM: 9Mbit
  3713. >0x148 byte 0x53  \b, ROM: 10Mbit
  3714. >0x148 byte 0x54  \b, ROM: 12Mbit
  3715.  
  3716. >0x149 byte 1     \b, RAM: 16Kbit
  3717. >0x149 byte 2     \b, RAM: 64Kbit
  3718. >0x149 byte 3     \b, RAM: 128Kbit
  3719. >0x149 byte 4     \b, RAM: 1Mbit
  3720.  
  3721. #>0x14e long  x     \b, CRC: %x
  3722.  
  3723. #------------------------------------------------------------------------------
  3724. # genesis:  file(1) magic for the Sega MegaDrive/Genesis raw ROM format
  3725. #
  3726. 0x100 string SEGA  Sega MegaDrive/Genesis raw ROM dump
  3727. >0x120 string >\0 Name: "%.16s"
  3728. >0x110 string >\0 %.16s
  3729. >0x1B0 string RA with SRAM
  3730.  
  3731. #------------------------------------------------------------------------------
  3732. # genesis:  file(1) magic for the Super MegaDrive ROM dump format
  3733. #
  3734. 0x280 string EAGN  Super MagicDrive ROM dump
  3735. >0 byte x %dx16k blocks
  3736. >2 byte 0 \b, last in series or standalone
  3737. >2 byte >0 \b, split ROM
  3738. >8 byte 0xAA
  3739. >9 byte 0xBB
  3740.  
  3741. #------------------------------------------------------------------------------
  3742. # genesis:  file(1) alternate magic for the Super MegaDrive ROM dump format
  3743. #
  3744. 0x280 string EAMG  Super MagicDrive ROM dump
  3745. >0 byte x %dx16k blocks
  3746. >2 byte x \b, last in series or standalone
  3747. >8 byte 0xAA
  3748. >9 byte 0xBB
  3749.  
  3750. #------------------------------------------------------------------------------
  3751. # smsgg:  file(1) magic for Sega Master System and Game Gear ROM dumps
  3752. #
  3753. # Does not detect all images.  Very preliminary guesswork.  Need more data
  3754. # on format.
  3755. #
  3756. # FIXME: need a little more info...;P
  3757. #
  3758. #0 byte 0xF3
  3759. #>1 byte 0xED  Sega Master System/Game Gear ROM dump
  3760. #>1 byte 0x31  Sega Master System/Game Gear ROM dump
  3761. #>1 byte 0xDB  Sega Master System/Game Gear ROM dump
  3762. #>1 byte 0xAF  Sega Master System/Game Gear ROM dump
  3763. #>1 byte 0xC3  Sega Master System/Game Gear ROM dump
  3764.  
  3765. #------------------------------------------------------------------------------
  3766. # dreamcast:  file(1) uncertain magic for the Sega Dreamcast VMU image format
  3767. #
  3768. 0 belong 0x21068028   Sega Dreamcast VMU game image
  3769. 0 string LCDi         Dream Animator file
  3770.  
  3771. #------------------------------------------------------------------------------
  3772. # v64: file(1) uncertain magic for the V64 format N64 ROM dumps
  3773. #
  3774. 0 belong 0x37804012    V64 Nintendo 64 ROM dump
  3775.  
  3776. #------------------------------------------------------------------------------
  3777. # msx: file(1) magic for MSX game cartridge dumps
  3778. # Too simple - MPi
  3779. #0 beshort 0x4142 MSX game cartridge dump 
  3780.  
  3781. #------------------------------------------------------------------------------
  3782. # Sony Playstation executables (Adam Sjoegren <asjo@diku.dk>) :
  3783. 0    string    PS-X\ EXE    Sony Playstation executable
  3784. #  Area:
  3785. >113    string    x        (%s)
  3786.  
  3787. #------------------------------------------------------------------------------
  3788. # Microsoft Xbox executables .xbe (Esa Hyyti├ñ <ehyytia@cc.hut.fi>)
  3789. 0       string          XBEH            XBE, Microsoft Xbox executable
  3790. # probabilistic checks whether signed or not
  3791. >0x0004 ulelong =0x0
  3792. >>&2    ulelong =0x0
  3793. >>>&2   ulelong =0x0  \b, not signed
  3794. >0x0004 ulelong >0
  3795. >>&2    ulelong >0
  3796. >>>&2   ulelong >0    \b, signed
  3797. # expect base address of 0x10000
  3798. >0x0104               ulelong =0x10000
  3799. >>(0x0118-0x0FF60)    ulelong&0x80000007  0x80000007 \b, all regions
  3800. >>(0x0118-0x0FF60)    ulelong&0x80000007  !0x80000007
  3801. >>>(0x0118-0x0FF60)   ulelong >0           (regions:
  3802. >>>>(0x0118-0x0FF60)  ulelong &0x00000001  NA
  3803. >>>>(0x0118-0x0FF60)  ulelong &0x00000002  Japan
  3804. >>>>(0x0118-0x0FF60)  ulelong &0x00000004  Rest_of_World
  3805. >>>>(0x0118-0x0FF60)  ulelong &0x80000000  Manufacturer
  3806. >>>(0x0118-0x0FF60)   ulelong >0           \b)
  3807.  
  3808. # --------------------------------
  3809. # Microsoft Xbox data file formats
  3810. 0       string          XIP0            XIP, Microsoft Xbox data
  3811. 0       string          XTF0            XTF, Microsoft Xbox data
  3812.  
  3813. # Atari Lynx cartridge dump (EXE/BLL header)
  3814. # From: "Stefan A. Haubenthal" <polluks@web.de>
  3815.  
  3816. 0    beshort        0x8008        Lynx cartridge,
  3817. >2    beshort        x        RAM start $%04x
  3818. >6    string        BS93
  3819.  
  3820. # Opera file system that is used on the 3DO console
  3821. # From: Serge van den Boom <svdb@stack.nl>
  3822. 0    string        \x01ZZZZZ\x01    3DO "Opera" file system
  3823.  
  3824. # From G├╝rkan Seng├╝n <gurkan@linuks.mine.nu>, www.linuks.mine.nu
  3825. 0    string        GBS        Nintendo Gameboy Music/Audio Data
  3826. 12    string        GameBoy\ Music\ Module    Nintendo Gameboy Music Module
  3827.  
  3828. # Playstations Patch Files from: From: Thomas Klausner <tk@giga.or.at>
  3829. 0    string    PPF30            Playstation Patch File version 3.0
  3830. >5    byte    0            \b, PPF 1.0 patch
  3831. >5    byte    1            \b, PPF 2.0 patch
  3832. >5    byte    2            \b, PPF 3.0 patch
  3833. >>56    byte    0            \b, Imagetype BIN (any)
  3834. >>56    byte    1            \b, Imagetype GI (PrimoDVD)
  3835. >>57    byte    0            \b, Blockcheck disabled
  3836. >>57    byte    1            \b, Blockcheck enabled
  3837. >>58    byte    0            \b, Undo data not available
  3838. >>58    byte    1            \b, Undo data available
  3839. >6    string    x            \b, description: %s
  3840.  
  3841. 0    string    PPF20            Playstation Patch File version 2.0
  3842. >5    byte    0            \b, PPF 1.0 patch
  3843. >5    byte    1            \b, PPF 2.0 patch
  3844. >>56    lelong    >0            \b, size of file to patch %d
  3845. >6    string    x            \b, description: %s
  3846.  
  3847. 0    string    PPF10            Playstation Patch File version 1.0
  3848. >5    byte    0            \b, Simple Encoding
  3849. >6    string    x            \b, description: %s
  3850.  
  3851. # From: Daniel Dawson <ddawson@icehouse.net>
  3852. # SNES9x .smv "movie" file format.
  3853. 0        string        SMV\x1A    SNES9x input recording
  3854. >0x4        lelong        x    \b, version %d
  3855. # version 4 is latest so far 
  3856. >0x4        lelong        <5
  3857. >>0x8        ledate        x    \b, recorded at %s
  3858. >>0xc        lelong        >0    \b, rerecorded %d times
  3859. >>0x10        lelong        x    \b, %d frames long
  3860. >>0x14        byte        >0    \b, data for controller(s):
  3861. >>>0x14        byte        &0x1    #1
  3862. >>>0x14        byte        &0x2    #2
  3863. >>>0x14        byte        &0x4    #3
  3864. >>>0x14        byte        &0x8    #4
  3865. >>>0x14        byte        &0x10    #5
  3866. >>0x15        byte        ^0x1    \b, begins from snapshot
  3867. >>0x15        byte        &0x1    \b, begins from reset
  3868. >>0x15        byte        ^0x2    \b, NTSC standard
  3869. >>0x15        byte        &0x2    \b, PAL standard
  3870. >>0x17        byte        &0x1    \b, settings:
  3871. # WIP1Timing not used as of version 4
  3872. >>>0x4        lelong        <4
  3873. >>>>0x17    byte        &0x2    WIP1Timing
  3874. >>>0x17        byte        &0x4    Left+Right
  3875. >>>0x17        byte        &0x8    VolumeEnvX
  3876. >>>0x17        byte        &0x10    FakeMute
  3877. >>>0x17        byte        &0x20    SyncSound
  3878. # New flag as of version 4
  3879. >>>0x4        lelong        >3
  3880. >>>>0x17    byte        &0x80    NoCPUShutdown
  3881. >>0x4        lelong        <4
  3882. >>>0x18        lelong        >0x23
  3883. >>>>0x20    leshort        !0
  3884. >>>>>0x20    lestring16    x    \b, metadata: "%s"
  3885. >>0x4        lelong        >3
  3886. >>>0x24        byte        >0    \b, port 1:
  3887. >>>>0x24    byte        1    joypad
  3888. >>>>0x24    byte        2    mouse
  3889. >>>>0x24    byte        3    SuperScope
  3890. >>>>0x24    byte        4    Justifier
  3891. >>>>0x24    byte        5    multitap
  3892. >>>0x24        byte        >0    \b, port 2:
  3893. >>>>0x25    byte        1    joypad
  3894. >>>>0x25    byte        2    mouse
  3895. >>>>0x25    byte        3    SuperScope
  3896. >>>>0x25    byte        4    Justifier
  3897. >>>>0x25    byte        5    multitap
  3898. >>>0x18        lelong        >0x43
  3899. >>>>0x40    leshort        !0
  3900. >>>>>0x40    lestring16    x    \b, metadata: "%s"
  3901. >>0x17        byte        &0x40   \b, ROM:
  3902. >>>(0x18.l-26)    lelong        x    CRC32 0x%08x
  3903. >>>(0x18.l-23)    string        x    "%s"
  3904.  
  3905. # From: "Nelson A. de Oliveira" <naoliv@gmail.com>
  3906. # .w3g
  3907. 0    string Warcraft\ III\ recorded\ game    %s
  3908. # .w3m
  3909. 0    string HM3W                Warcraft III map file
  3910.  
  3911. # Type: scummVM savegame files
  3912. # From: Sven Hartge <debian@ds9.argh.org>
  3913. 0    string    SCVM    scummVM savegame
  3914. >12    string    >\0    "%s"
  3915. #------------------------------------------------------------------------------
  3916. # convex:  file(1) magic for Convex boxes
  3917. #
  3918. # Convexes are big-endian.
  3919. #
  3920. # /*\
  3921. #  * Below are the magic numbers and tests added for Convex.
  3922. #  * Added at beginning, because they are expected to be used most.
  3923. # \*/
  3924. 0    belong    0507    Convex old-style object
  3925. >16    belong    >0    not stripped
  3926. 0    belong    0513    Convex old-style demand paged executable
  3927. >16    belong    >0    not stripped
  3928. 0    belong    0515    Convex old-style pre-paged executable
  3929. >16    belong    >0    not stripped
  3930. 0    belong    0517    Convex old-style pre-paged, non-swapped executable
  3931. >16    belong    >0    not stripped
  3932. 0    belong    0x011257    Core file
  3933. #
  3934. # The following are a series of dump format magic numbers.  Each one
  3935. # corresponds to a drastically different dump format.  The first on is
  3936. # the original dump format on a 4.1 BSD or earlier file system.  The
  3937. # second marks the change between the 4.1 file system and the 4.2 file
  3938. # system.  The Third marks the changing of the block size from 1K
  3939. # to 2K to be compatible with an IDC file system.  The fourth indicates
  3940. # a dump that is dependent on Convex Storage Manager, because data in
  3941. # secondary storage is not physically contained within the dump.
  3942. # The restore program uses these number to determine how the data is
  3943. # to be extracted.
  3944. #
  3945. 24    belong    =60011    dump format, 4.1 BSD or earlier
  3946. 24    belong    =60012    dump format, 4.2 or 4.3 BSD without IDC
  3947. 24    belong    =60013    dump format, 4.2 or 4.3 BSD (IDC compatible)
  3948. 24    belong    =60014    dump format, Convex Storage Manager by-reference dump
  3949. #
  3950. # what follows is a bunch of bit-mask checks on the flags field of the opthdr.
  3951. # If there is no `=' sign, assume just checking for whether the bit is set?
  3952. #
  3953. 0    belong    0601        Convex SOFF
  3954. >88    belong&0x000f0000    =0x00000000    c1
  3955. >88    belong            &0x00010000    c2
  3956. >88    belong            &0x00020000    c2mp
  3957. >88    belong            &0x00040000    parallel
  3958. >88    belong            &0x00080000    intrinsic
  3959. >88    belong            &0x00000001    demand paged
  3960. >88    belong            &0x00000002    pre-paged
  3961. >88    belong            &0x00000004    non-swapped
  3962. >88    belong            &0x00000008    POSIX
  3963. #
  3964. >84    belong            &0x80000000    executable
  3965. >84    belong            &0x40000000    object
  3966. >84    belong&0x20000000    =0        not stripped
  3967. >84    belong&0x18000000    =0x00000000    native fpmode
  3968. >84    belong&0x18000000    =0x10000000    ieee fpmode
  3969. >84    belong&0x18000000    =0x18000000    undefined fpmode
  3970. #
  3971. 0    belong            0605        Convex SOFF core
  3972. #
  3973. 0    belong            0607        Convex SOFF checkpoint
  3974. >88    belong&0x000f0000    =0x00000000    c1
  3975. >88    belong            &0x00010000    c2
  3976. >88    belong            &0x00020000    c2mp
  3977. >88    belong            &0x00040000    parallel
  3978. >88    belong            &0x00080000    intrinsic
  3979. >88    belong            &0x00000008    POSIX
  3980. #
  3981. >84    belong&0x18000000    =0x00000000    native fpmode
  3982. >84    belong&0x18000000    =0x10000000    ieee fpmode
  3983. >84    belong&0x18000000    =0x18000000    undefined fpmode
  3984.  
  3985. #------------------------------------------------------------------------------
  3986. # cracklib:  file (1) magic for cracklib v2.7
  3987.  
  3988. 0    lelong    0x70775631    Cracklib password index, little endian
  3989. >4    long    >0        (%i words)
  3990. >4    long    0        ("64-bit")
  3991. >>8    long    >-1        (%i words)
  3992. 0    belong    0x70775631    Cracklib password index, big endian
  3993. >4    belong    >-1        (%i words)
  3994. # really bellong 0x0000000070775631
  3995. 0    search/1    \0\0\0\0pwV1    Cracklib password index, big endian ("64-bit")
  3996. >12    belong    >0        (%i words)
  3997. # ----------------------------------------------------------------------------
  3998. # ctags:  file (1) magic for Exuberant Ctags files
  3999. # From: Alexander Mai <mai@migdal.ikp.physik.tu-darmstadt.de>
  4000. 0    search/1    =!_TAG    Exuberant Ctags tag file text
  4001.  
  4002. #------------------------------------------------------------------------------
  4003. # dact:  file(1) magic for DACT compressed files
  4004. #
  4005. 0    long        0x444354C3    DACT compressed data
  4006. >4    byte        >-1        (version %i.
  4007. >5    byte        >-1        $BS%i.
  4008. >6    byte        >-1        $BS%i)
  4009. >7    long        >0        $BS, original size: %i bytes
  4010. >15    long        >30        $BS, block size: %i bytes
  4011.  
  4012. #------------------------------------------------------------------------------
  4013. # database:  file(1) magic for various databases
  4014. #
  4015. # extracted from header/code files by Graeme Wilford (eep2gw@ee.surrey.ac.uk)
  4016. #
  4017. #
  4018. # GDBM magic numbers
  4019. #  Will be maintained as part of the GDBM distribution in the future.
  4020. #  <downsj@teeny.org>
  4021. 0    belong    0x13579ace    GNU dbm 1.x or ndbm database, big endian
  4022. !:mime    application/x-gdbm
  4023. 0    lelong    0x13579ace    GNU dbm 1.x or ndbm database, little endian
  4024. !:mime    application/x-gdbm
  4025. 0    string    GDBM        GNU dbm 2.x database
  4026. !:mime    application/x-gdbm
  4027. #
  4028. # Berkeley DB
  4029. #
  4030. # Ian Darwin's file /etc/magic files: big/little-endian version.
  4031. #
  4032. # Hash 1.85/1.86 databases store metadata in network byte order.
  4033. # Btree 1.85/1.86 databases store the metadata in host byte order.
  4034. # Hash and Btree 2.X and later databases store the metadata in host byte order.
  4035.  
  4036. 0    long    0x00061561    Berkeley DB
  4037. !:mime    application/x-dbm
  4038. >8    belong    4321
  4039. >>4    belong    >2        1.86
  4040. >>4    belong    <3        1.85
  4041. >>4    belong    >0        (Hash, version %d, native byte-order)
  4042. >8    belong    1234
  4043. >>4    belong    >2        1.86
  4044. >>4    belong    <3        1.85
  4045. >>4    belong    >0        (Hash, version %d, little-endian)
  4046.  
  4047. 0    belong    0x00061561    Berkeley DB
  4048. >8    belong    4321
  4049. >>4    belong    >2        1.86
  4050. >>4    belong    <3        1.85
  4051. >>4    belong    >0        (Hash, version %d, big-endian)
  4052. >8    belong    1234
  4053. >>4    belong    >2        1.86
  4054. >>4    belong    <3        1.85
  4055. >>4    belong    >0        (Hash, version %d, native byte-order)
  4056.  
  4057. 0    long    0x00053162    Berkeley DB 1.85/1.86
  4058. >4    long    >0        (Btree, version %d, native byte-order)
  4059. 0    belong    0x00053162    Berkeley DB 1.85/1.86
  4060. >4    belong    >0        (Btree, version %d, big-endian)
  4061. 0    lelong    0x00053162    Berkeley DB 1.85/1.86
  4062. >4    lelong    >0        (Btree, version %d, little-endian)
  4063.  
  4064. 12    long    0x00061561    Berkeley DB
  4065. >16    long    >0        (Hash, version %d, native byte-order)
  4066. 12    belong    0x00061561    Berkeley DB
  4067. >16    belong    >0        (Hash, version %d, big-endian)
  4068. 12    lelong    0x00061561    Berkeley DB
  4069. >16    lelong    >0        (Hash, version %d, little-endian)
  4070.  
  4071. 12    long    0x00053162    Berkeley DB
  4072. >16    long    >0        (Btree, version %d, native byte-order)
  4073. 12    belong    0x00053162    Berkeley DB
  4074. >16    belong    >0        (Btree, version %d, big-endian)
  4075. 12    lelong    0x00053162    Berkeley DB
  4076. >16    lelong    >0        (Btree, version %d, little-endian)
  4077.  
  4078. 12    long    0x00042253    Berkeley DB
  4079. >16    long    >0        (Queue, version %d, native byte-order)
  4080. 12    belong    0x00042253    Berkeley DB
  4081. >16    belong    >0        (Queue, version %d, big-endian)
  4082. 12    lelong    0x00042253    Berkeley DB
  4083. >16    lelong    >0        (Queue, version %d, little-endian)
  4084.  
  4085. # From Max Bowsher.
  4086. 12    long    0x00040988    Berkeley DB
  4087. >16    long    >0        (Log, version %d, native byte-order)
  4088. 12    belong    0x00040988    Berkeley DB 
  4089. >16    belong    >0        (Log, version %d, big-endian)
  4090. 12    lelong    0x00040988    Berkeley DB
  4091. >16    lelong    >0        (Log, version %d, little-endian)
  4092.  
  4093. #
  4094. #
  4095. # Round Robin Database Tool by Tobias Oetiker <oetiker@ee.ethz.ch>
  4096. 0    string    RRD        RRDTool DB
  4097. >4    string    x        version %s
  4098. #----------------------------------------------------------------------
  4099. # ROOT: file(1) magic for ROOT databases
  4100. #
  4101. 0       string  root\0  ROOT file
  4102. >4      belong  x       Version %d
  4103. >33     belong  x       (Compression: %d)
  4104.  
  4105. # XXX: Weak magic.
  4106. # Alex Ott <ott@jet.msk.su>
  4107. ## Paradox file formats
  4108. #2      leshort    0x0800    Paradox 
  4109. #>0x39      byte        3    v. 3.0 
  4110. #>0x39      byte        4    v. 3.5 
  4111. #>0x39      byte        9    v. 4.x 
  4112. #>0x39      byte        10    v. 5.x 
  4113. #>0x39      byte        11    v. 5.x 
  4114. #>0x39      byte        12    v. 7.x 
  4115. #>>0x04      byte        0    indexed .DB data file 
  4116. #>>0x04      byte        1    primary index .PX file 
  4117. #>>0x04      byte        2    non-indexed .DB data file 
  4118. #>>0x04      byte        3    non-incrementing secondary index .Xnn file 
  4119. #>>0x04      byte        4    secondary index .Ynn file 
  4120. #>>0x04      byte        5    incrementing secondary index .Xnn file 
  4121. #>>0x04      byte        6    non-incrementing secondary index .XGn file 
  4122. #>>0x04      byte        7    secondary index .YGn file 
  4123. #>>>0x04      byte        8    incrementing secondary index .XGn file 
  4124.  
  4125. ## XBase database files
  4126. #0      byte       0x02    
  4127. #>8     leshort      >0
  4128. #>>12   leshort    0    FoxBase 
  4129. #!:mime    application/x-dbf
  4130. #>>>0x04    lelong        0        (no records)
  4131. #>>>0x04    lelong        >0        (%ld records)
  4132. #
  4133. #0      byte       0x03    
  4134. #!:mime    application/x-dbf
  4135. #>8     leshort      >0
  4136. #>>12   leshort    0    FoxBase+, FoxPro, dBaseIII+, dBaseIV, no memo 
  4137. #>>>0x04    lelong        0        (no records)
  4138. #>>>0x04    lelong        >0        (%ld records)
  4139. #
  4140. #0      byte       0x04    
  4141. #!:mime    application/x-dbf
  4142. #>8     leshort      >0
  4143. #>>12   leshort    0    dBASE IV no memo file 
  4144. #>>>0x04    lelong        0        (no records)
  4145. #>>>0x04    lelong        >0        (%ld records)
  4146. #
  4147. #0      byte       0x05    
  4148. #!:mime    application/x-dbf
  4149. #>8     leshort      >0
  4150. #>>12   leshort    0    dBASE V no memo file 
  4151. #>>>0x04    lelong        0        (no records)
  4152. #>>>0x04    lelong        >0        (%ld records)
  4153. #
  4154. #0      byte       0x30
  4155. #!:mime    application/x-dbf
  4156. #>8     leshort      >0
  4157. #>>12   leshort    0    Visual FoxPro 
  4158. #>>>0x04    lelong        0        (no records)
  4159. #>>>0x04    lelong        >0        (%ld records)
  4160. #
  4161. #0      byte       0x43
  4162. #!:mime    application/x-dbf
  4163. #>8     leshort      >0
  4164. #>>12   leshort    0    FlagShip with memo var size 
  4165. #>>>0x04    lelong        0        (no records)
  4166. #>>>0x04    lelong        >0        (%ld records)
  4167. #
  4168. #0      byte       0x7b
  4169. #!:mime    application/x-dbf
  4170. #>8     leshort      >0
  4171. #>>12   leshort    0    dBASEIV with memo 
  4172. #>>>0x04    lelong        0        (no records)
  4173. #>>>0x04    lelong        >0        (%ld records)
  4174. #
  4175. #0      byte       0x83    
  4176. #!:mime    application/x-dbf
  4177. #>8     leshort      >0
  4178. #>>12   leshort    0    FoxBase+, dBaseIII+ with memo 
  4179. #>>>0x04    lelong        0        (no records)
  4180. #>>>0x04    lelong        >0        (%ld records)
  4181. #
  4182. #0      byte       0x8b
  4183. #!:mime    application/x-dbf
  4184. #>8     leshort      >0
  4185. #>>12   leshort    0    dBaseIV with memo 
  4186. #>>>0x04    lelong        0        (no records)
  4187. #>>>0x04    lelong        >0        (%ld records)
  4188. #
  4189. #0      byte       0x8e    
  4190. #!:mime    application/x-dbf
  4191. #>8     leshort      >0
  4192. #>>12   leshort    0    dBaseIV with SQL Table 
  4193. #>>>0x04    lelong        0        (no records)
  4194. #>>>0x04    lelong        >0        (%ld records)
  4195. #
  4196. #0      byte       0xb3
  4197. #!:mime    application/x-dbf
  4198. #>8     leshort      >0
  4199. #>>12   leshort    0    FlagShip with .dbt memo 
  4200. #>>>0x04    lelong        0        (no records)
  4201. #>>>0x04    lelong        >0        (%ld records)
  4202. #
  4203. #0      byte       0xf5
  4204. #!:mime    application/x-dbf
  4205. #>8     leshort      >0
  4206. #>>12   leshort    0    FoxPro with memo 
  4207. #>>>0x04    lelong        0        (no records)
  4208. #>>>0x04    lelong        >0        (%ld records)
  4209. #
  4210. #0    leshort        0x0006        DBase 3 index file
  4211.  
  4212. # MS Access database
  4213. 4    string    Standard\ Jet\ DB    Microsoft Access Database
  4214. !:mime    application/x-msaccess
  4215.  
  4216. # TDB database from Samba et al - Martin Pool <mbp@samba.org>
  4217. 0    string    TDB\ file        TDB database
  4218. >32    lelong    0x2601196D        version 6, little-endian
  4219. >>36    lelong    x            hash size %d bytes
  4220.  
  4221. # SE Linux policy database
  4222. 0       lelong  0xf97cff8c      SE Linux policy
  4223. >16     lelong  x               v%d
  4224. >20     lelong  1      MLS
  4225. >24     lelong  x       %d symbols
  4226. >28     lelong  x       %d ocons
  4227.  
  4228. # ICE authority file data (Wolfram Kleff)
  4229. 2    string        ICE        ICE authority data
  4230.  
  4231. # X11 Xauthority file (Wolfram Kleff)
  4232. 10    string        MIT-MAGIC-COOKIE-1    X11 Xauthority data
  4233. 11    string        MIT-MAGIC-COOKIE-1    X11 Xauthority data
  4234. 12    string        MIT-MAGIC-COOKIE-1    X11 Xauthority data
  4235. 13    string        MIT-MAGIC-COOKIE-1    X11 Xauthority data
  4236. 14    string        MIT-MAGIC-COOKIE-1    X11 Xauthority data
  4237. 15    string        MIT-MAGIC-COOKIE-1    X11 Xauthority data
  4238. 16    string        MIT-MAGIC-COOKIE-1    X11 Xauthority data
  4239. 17    string        MIT-MAGIC-COOKIE-1    X11 Xauthority data
  4240. 18    string        MIT-MAGIC-COOKIE-1    X11 Xauthority data
  4241.  
  4242. # From: Maxime Henrion <mux@FreeBSD.org>
  4243. # PostgreSQL's custom dump format, Maxime Henrion <mux@FreeBSD.org>
  4244. 0    string        PGDMP        PostgreSQL custom database dump
  4245. >5    byte        x        - v%d
  4246. >6    byte        x        \b.%d
  4247. >5    beshort        <=0x100        \b-0
  4248. >5    beshort        >0x100
  4249. >>7    byte        x        \b-%d
  4250.  
  4251. # Type: Advanced Data Format (ADF) database
  4252. # URL:  http://www.grc.nasa.gov/WWW/cgns/adf/
  4253. # From: Nicolas Chauvat <nicolas.chauvat@logilab.fr>
  4254. 0    string    @(#)ADF\ Database    CGNS Advanced Data Format
  4255.  
  4256. # Type:    QDBM Quick Database Manager
  4257. # From:    Benoit Sibaud <bsibaud@april.org>
  4258. 0    string    \\[depot\\]\n\f        Quick Database Manager, little endian
  4259. 0    string    \\[DEPOT\\]\n\f        Quick Database Manager, big endian
  4260.  
  4261. # Type:    TokyoCabinet database
  4262. # URL:    http://tokyocabinet.sourceforge.net/
  4263. # From:    Benoit Sibaud <bsibaud@april.org>
  4264. 0    string    ToKyO\ CaBiNeT\n    TokyoCabinet database
  4265. >14    string    x            (version %s)
  4266.  
  4267. #------------------------------------------------------------------------------
  4268. # diamond:  file(1) magic for Diamond system
  4269. #
  4270. # ... diamond is a multi-media mail and electronic conferencing system....
  4271. #
  4272. # XXX - I think it was either renamed Slate, or replaced by Slate....
  4273. #
  4274. #    The full deal is too long...
  4275. #0    string    <list>\n<protocol\ bbn-multimedia-format>    Diamond Multimedia Document
  4276. 0    string    =<list>\n<protocol\ bbn-m    Diamond Multimedia Document
  4277. #------------------------------------------------------------------------------
  4278. # diff:  file(1) magic for diff(1) output
  4279. #
  4280. 0    search/1    diff\         diff output text
  4281. 0    search/1    ***\         diff output text
  4282. 0    search/1    Only\ in\     diff output text
  4283. 0    search/1    Common\ subdirectories:\     diff output text
  4284.  
  4285. 0    search/1    Index:        RCS/CVS diff output text
  4286. #  Digital UNIX - Info
  4287. #
  4288. 0    string    =!<arch>\n________64E    Alpha archive
  4289. >22    string    X            -- out of date
  4290. #
  4291. # Alpha COFF Based Executables
  4292. # The stripped stuff really needs to be an 8 byte (64 bit) compare,
  4293. # but this works
  4294. 0    leshort        0x183        COFF format alpha
  4295. >22    leshort&020000    &010000        sharable library,
  4296. >22    leshort&020000    ^010000        dynamically linked,
  4297. >24    leshort        0410        pure
  4298. >24    leshort        0413        demand paged
  4299. >8    lelong        >0        executable or object module, not stripped
  4300. >8    lelong        0
  4301. >>12    lelong        0        executable or object module, stripped
  4302. >>12    lelong        >0        executable or object module, not stripped
  4303. >27     byte            >0              - version %d.
  4304. >26     byte            >0              %d-
  4305. >28     leshort         >0              %d
  4306. #
  4307. # The next is incomplete, we could tell more about this format,
  4308. # but its not worth it.
  4309. 0    leshort        0x188    Alpha compressed COFF
  4310. 0    leshort        0x18f    Alpha u-code object
  4311. #
  4312. #
  4313. # Some other interesting Digital formats,
  4314. 0    string    \377\377\177        ddis/ddif
  4315. 0    string    \377\377\174        ddis/dots archive
  4316. 0    string    \377\377\176        ddis/dtif table data
  4317. 0    string    \033c\033        LN03 output
  4318. 0    long    04553207        X image
  4319. #
  4320. 0    string    =!<PDF>!\n        profiling data file
  4321. #
  4322. # Locale data tables (MIPS and Alpha).
  4323. #
  4324. 0    short        0x0501        locale data table
  4325. >6    short        0x24        for MIPS
  4326. >6    short        0x40        for Alpha
  4327. # ATSC A/53 aka AC-3 aka Dolby Digital <ashitaka@gmx.at>
  4328. # from http://www.atsc.org/standards/a_52a.pdf
  4329. # corrections, additions, etc. are always welcome!
  4330. #
  4331. # syncword
  4332. 0       beshort         0x0b77  ATSC A/52 aka AC-3 aka Dolby Digital stream,
  4333. # fscod
  4334. >4      byte&0xc0       0x00    48 kHz,
  4335. >4      byte&0xc0       0x40    44.1 kHz,
  4336. >4      byte&0xc0       0x80    32 kHz,
  4337. # is this one used for 96 kHz?
  4338. >4      byte&0xc0       0xc0    reserved frequency,
  4339. #
  4340. >5    byte&7 = 0        \b, complete main (CM)
  4341. >5    byte&7 = 1        \b, music and effects (ME)
  4342. >5    byte&7 = 2        \b, visually impaired (VI)
  4343. >5    byte&7 = 3        \b, hearing impaired (HI)
  4344. >5    byte&7 = 4        \b, dialogue (D)
  4345. >5    byte&7 = 5        \b, commentary (C)
  4346. >5    byte&7 = 6        \b, emergency (E)
  4347. # acmod
  4348. >6      byte&0xe0       0x00    1+1 front,
  4349. >6      byte&0xe0       0x20    1 front/0 rear,
  4350. >6      byte&0xe0       0x40    2 front/0 rear,
  4351. >6      byte&0xe0       0x60    3 front/0 rear,
  4352. >6      byte&0xe0       0x80    2 front/1 rear,
  4353. >6      byte&0xe0       0xa0    3 front/1 rear,
  4354. >6      byte&0xe0       0xc0    2 front/2 rear,
  4355. >6      byte&0xe0       0xe0    3 front/2 rear,
  4356. # lfeon (these may be incorrect)
  4357. >7      byte&0x40       0x00    LFE off,
  4358. >7      byte&0x40       0x40    LFE on,
  4359. #
  4360. >4    byte&0x3e = 0x00    \b, 32 kbit/s
  4361. >4    byte&0x3e = 0x02        \b, 40 kbit/s
  4362. >4    byte&0x3e = 0x04        \b, 48 kbit/s
  4363. >4    byte&0x3e = 0x06        \b, 56 kbit/s
  4364. >4    byte&0x3e = 0x08        \b, 64 kbit/s
  4365. >4    byte&0x3e = 0x0a        \b, 80 kbit/s
  4366. >4    byte&0x3e = 0x0c        \b, 96 kbit/s
  4367. >4    byte&0x3e = 0x0e        \b, 112 kbit/s
  4368. >4    byte&0x3e = 0x10        \b, 128 kbit/s
  4369. >4    byte&0x3e = 0x12        \b, 160 kbit/s
  4370. >4    byte&0x3e = 0x14        \b, 192 kbit/s
  4371. >4    byte&0x3e = 0x16        \b, 224 kbit/s
  4372. >4    byte&0x3e = 0x18        \b, 256 kbit/s
  4373. >4    byte&0x3e = 0x1a        \b, 320 kbit/s
  4374. >4    byte&0x3e = 0x1c        \b, 384 kbit/s
  4375. >4    byte&0x3e = 0x1e        \b, 448 kbit/s
  4376. >4    byte&0x3e = 0x20        \b, 512 kbit/s
  4377. >4    byte&0x3e = 0x22        \b, 576 kbit/s
  4378. >4    byte&0x3e = 0x24        \b, 640 kbit/s
  4379. # dsurmod (these may be incorrect)
  4380. >6      beshort&0x0180  0x0000  Dolby Surround not indicated
  4381. >6      beshort&0x0180  0x0080  not Dolby Surround encoded
  4382. >6      beshort&0x0180  0x0100  Dolby Surround encoded
  4383. >6      beshort&0x0180  0x0180  reserved Dolby Surround mode
  4384.  
  4385. #------------------------------------------------------------------------------
  4386. # dump:  file(1) magic for dump file format--for new and old dump filesystems
  4387. #
  4388. # We specify both byte orders in order to recognize byte-swapped dumps.
  4389. #
  4390. 24    belong    60012        new-fs dump file (big endian),
  4391. >4    bedate    x        Previous dump %s,
  4392. >8    bedate    x        This dump %s,
  4393. >12    belong    >0        Volume %ld,
  4394. >692    belong    0        Level zero, type:
  4395. >692    belong    >0        Level %d, type:
  4396. >0    belong    1        tape header,
  4397. >0    belong    2        beginning of file record,
  4398. >0    belong    3        map of inodes on tape,
  4399. >0    belong    4        continuation of file record,
  4400. >0    belong    5        end of volume,
  4401. >0    belong    6        map of inodes deleted,
  4402. >0    belong    7        end of medium (for floppy),
  4403. >676    string    >\0        Label %s,
  4404. >696    string    >\0        Filesystem %s,
  4405. >760    string    >\0        Device %s,
  4406. >824    string    >\0        Host %s,
  4407. >888    belong    >0        Flags %x
  4408.  
  4409. 24    belong    60011        old-fs dump file (big endian),
  4410. #>4    bedate    x        Previous dump %s,
  4411. #>8    bedate    x        This dump %s,
  4412. >12    belong    >0        Volume %ld,
  4413. >692    belong    0        Level zero, type:
  4414. >692    belong    >0        Level %d, type:
  4415. >0    belong    1        tape header,
  4416. >0    belong    2        beginning of file record,
  4417. >0    belong    3        map of inodes on tape,
  4418. >0    belong    4        continuation of file record,
  4419. >0    belong    5        end of volume,
  4420. >0    belong    6        map of inodes deleted,
  4421. >0    belong    7        end of medium (for floppy),
  4422. >676    string    >\0        Label %s,
  4423. >696    string    >\0        Filesystem %s,
  4424. >760    string    >\0        Device %s,
  4425. >824    string    >\0        Host %s,
  4426. >888    belong    >0        Flags %x
  4427.  
  4428. 24    lelong    60012        new-fs dump file (little endian),
  4429. >4    ledate    x        This dump %s,
  4430. >8    ledate    x        Previous dump %s,
  4431. >12    lelong    >0        Volume %ld,
  4432. >692    lelong    0        Level zero, type:
  4433. >692    lelong    >0        Level %d, type:
  4434. >0    lelong    1        tape header,
  4435. >0    lelong    2        beginning of file record,
  4436. >0    lelong    3        map of inodes on tape,
  4437. >0    lelong    4        continuation of file record,
  4438. >0    lelong    5        end of volume,
  4439. >0    lelong    6        map of inodes deleted,
  4440. >0    lelong    7        end of medium (for floppy),
  4441. >676    string    >\0        Label %s,
  4442. >696    string    >\0        Filesystem %s,
  4443. >760    string    >\0        Device %s,
  4444. >824    string    >\0        Host %s,
  4445. >888    lelong    >0        Flags %x
  4446.  
  4447. 24    lelong    60011        old-fs dump file (little endian),
  4448. #>4    ledate    x        Previous dump %s,
  4449. #>8    ledate    x        This dump %s,
  4450. >12    lelong    >0        Volume %ld,
  4451. >692    lelong    0        Level zero, type:
  4452. >692    lelong    >0        Level %d, type:
  4453. >0    lelong    1        tape header,
  4454. >0    lelong    2        beginning of file record,
  4455. >0    lelong    3        map of inodes on tape,
  4456. >0    lelong    4        continuation of file record,
  4457. >0    lelong    5        end of volume,
  4458. >0    lelong    6        map of inodes deleted,
  4459. >0    lelong    7        end of medium (for floppy),
  4460. >676    string    >\0        Label %s,
  4461. >696    string    >\0        Filesystem %s,
  4462. >760    string    >\0        Device %s,
  4463. >824    string    >\0        Host %s,
  4464. >888    lelong    >0        Flags %x
  4465.  
  4466. 18    leshort    60011        old-fs dump file (16-bit, assuming PDP-11 endianness),
  4467. >2    medate    x        Previous dump %s,
  4468. >6    medate    x        This dump %s,
  4469. >10    leshort    >0        Volume %ld,
  4470. >0    leshort    1        tape header.
  4471. >0    leshort    2        beginning of file record.
  4472. >0    leshort    3        map of inodes on tape.
  4473. >0    leshort    4        continuation of file record.
  4474. >0    leshort    5        end of volume.
  4475. >0    leshort    6        map of inodes deleted.
  4476. >0    leshort    7        end of medium (for floppy).
  4477.  
  4478. 24    belong    0x19540119    new-fs dump file (ufs2, big endian),
  4479. >896    beqdate    x        Previous dump %s,
  4480. >904    beqdate    x        This dump %s,
  4481. >12    belong    >0        Volume %ld,
  4482. >692    belong    0        Level zero, type:
  4483. >692    belong    >0        Level %d, type:
  4484. >0    belong    1        tape header,
  4485. >0    belong    2        beginning of file record,
  4486. >0    belong    3        map of inodes on tape,
  4487. >0    belong    4        continuation of file record,
  4488. >0    belong    5        end of volume,
  4489. >0    belong    6        map of inodes deleted,
  4490. >0    belong    7        end of medium (for floppy),
  4491. >676    string    >\0        Label %s,
  4492. >696    string    >\0        Filesystem %s,
  4493. >760    string    >\0        Device %s,
  4494. >824    string    >\0        Host %s,
  4495. >888    belong    >0        Flags %x
  4496.  
  4497. 24    lelong    0x19540119    new-fs dump file (ufs2, little endian),
  4498. >896    leqdate    x        This dump %s,
  4499. >904    leqdate    x        Previous dump %s,
  4500. >12    lelong    >0        Volume %ld,
  4501. >692    lelong    0        Level zero, type:
  4502. >692    lelong    >0        Level %d, type:
  4503. >0    lelong    1        tape header,
  4504. >0    lelong    2        beginning of file record,
  4505. >0    lelong    3        map of inodes on tape,
  4506. >0    lelong    4        continuation of file record,
  4507. >0    lelong    5        end of volume,
  4508. >0    lelong    6        map of inodes deleted,
  4509. >0    lelong    7        end of medium (for floppy),
  4510. >676    string    >\0        Label %s,
  4511. >696    string    >\0        Filesystem %s,
  4512. >760    string    >\0        Device %s,
  4513. >824    string    >\0        Host %s,
  4514. >888    lelong    >0        Flags %x
  4515.  
  4516. #------------------------------------------------------------------------------
  4517. # Dyadic: file(1) magic for Dyalog APL.
  4518. #
  4519. 0     byte    0xaa
  4520. >1    byte    <4        Dyalog APL
  4521. >>1    byte    0x00        incomplete workspace
  4522. >>1    byte    0x01        component file
  4523. >>1    byte    0x02        external variable
  4524. >>1    byte    0x03        workspace
  4525. >>2    byte    x        version %d
  4526. >>3    byte    x        .%d
  4527.  
  4528. #------------------------------------------------------------------------------
  4529. # T602 editor documents 
  4530. # by David Necas <yeti@physics.muni.cz>
  4531. 0    string    @CT\     T602 document data,
  4532. >4    string    0    Kamenicky
  4533. >4    string    1    CP 852
  4534. >4    string    2    KOI8-CS
  4535. >4    string    >2    unknown encoding
  4536.  
  4537. # Vi IMproved Encrypted file 
  4538. # by David Necas <yeti@physics.muni.cz>
  4539. 0    string    VimCrypt~    Vim encrypted file data
  4540. # Vi IMproved Swap file
  4541. # by Sven Wegener <swegener@gentoo.org>
  4542. 0    string    b0VIM\         Vim swap file
  4543. >&0    string    >\0        \b, version %s
  4544.  
  4545. #------------------------------------------------------------------------------
  4546. # efi:  file(1) magic for Universal EFI binaries
  4547.  
  4548. 0    lelong    0x0ef1fab9
  4549. >4    lelong    1        Universal EFI binary with 1 architecture
  4550. >>&0    lelong    7        \b, i386
  4551. >>&0    lelong    0x01000007    \b, x86_64
  4552. >4    lelong    2        Universal EFI binary with 2 architectures
  4553. >>&0    lelong    7        \b, i386
  4554. >>&0    lelong    0x01000007    \b, x86_64
  4555. >>&20    lelong    7        \b, i386
  4556. >>&20    lelong    0x01000007    \b, x86_64
  4557. >4    lelong    >2        Universal EFI binary with %ld architectures
  4558.  
  4559. #------------------------------------------------------------------------------
  4560. # elf:  file(1) magic for ELF executables
  4561. #
  4562. # We have to check the byte order flag to see what byte order all the
  4563. # other stuff in the header is in.
  4564. #
  4565. # What're the correct byte orders for the nCUBE and the Fujitsu VPP500?
  4566. #
  4567. # updated by Daniel Quinlan (quinlan@yggdrasil.com)
  4568. 0    string        \177ELF        ELF
  4569. >4    byte        0        invalid class
  4570. >4    byte        1        32-bit
  4571. >4    byte        2        64-bit
  4572. >5    byte        0        invalid byte order
  4573. >5    byte        1        LSB
  4574. >>16    leshort        0        no file type,
  4575. !:mime    application/octet-stream
  4576. >>16    leshort        1        relocatable,
  4577. !:mime    application/x-object
  4578. >>16    leshort        2        executable,
  4579. !:mime    application/x-executable
  4580. >>16    leshort        3        shared object,
  4581. !:mime    application/x-sharedlib
  4582. # Core handling from Peter Tobias <tobias@server.et-inf.fho-emden.de>
  4583. # corrections by Christian 'Dr. Disk' Hechelmann <drdisk@ds9.au.s.shuttle.de>
  4584. >>16    leshort        4        core file
  4585. !:mime    application/x-coredump
  4586. # Core file detection is not reliable.
  4587. #>>>(0x38+0xcc) string    >\0        of '%s'
  4588. #>>>(0x38+0x10) lelong    >0        (signal %d),
  4589. >>16    leshort        &0xff00        processor-specific,
  4590. >>18    leshort        0        no machine,
  4591. >>18    leshort        1        AT&T WE32100 - invalid byte order,
  4592. >>18    leshort        2        SPARC - invalid byte order,
  4593. >>18    leshort        3        Intel 80386,
  4594. >>18    leshort        4        Motorola
  4595. >>>36    lelong        &0x01000000    68000 - invalid byte order,
  4596. >>>36    lelong        &0x00810000    CPU32 - invalid byte order,
  4597. >>>36    lelong        0        68020 - invalid byte order,
  4598. >>18    leshort        5        Motorola 88000 - invalid byte order,
  4599. >>18    leshort        6        Intel 80486,
  4600. >>18    leshort        7        Intel 80860,
  4601. # The official e_machine number for MIPS is now #8, regardless of endianness.
  4602. # The second number (#10) will be deprecated later. For now, we still
  4603. # say something if #10 is encountered, but only gory details for #8.
  4604. >>18    leshort        8        MIPS,
  4605. >>>36    lelong        &0x20        N32
  4606. >>18    leshort        10        MIPS,
  4607. >>>36    lelong        &0x20        N32
  4608. >>18    leshort        8
  4609. # only for 32-bit
  4610. >>>4    byte        1
  4611. >>>>36  lelong&0xf0000000    0x00000000    MIPS-I
  4612. >>>>36  lelong&0xf0000000    0x10000000    MIPS-II
  4613. >>>>36  lelong&0xf0000000    0x20000000    MIPS-III
  4614. >>>>36  lelong&0xf0000000    0x30000000    MIPS-IV
  4615. >>>>36  lelong&0xf0000000    0x40000000    MIPS-V
  4616. >>>>36  lelong&0xf0000000    0x50000000    MIPS32
  4617. >>>>36  lelong&0xf0000000    0x60000000    MIPS64
  4618. >>>>36  lelong&0xf0000000    0x70000000    MIPS32 rel2
  4619. >>>>36  lelong&0xf0000000    0x80000000    MIPS64 rel2
  4620. # only for 64-bit
  4621. >>>4    byte        2
  4622. >>>>48  lelong&0xf0000000    0x00000000    MIPS-I
  4623. >>>>48  lelong&0xf0000000    0x10000000    MIPS-II
  4624. >>>>48  lelong&0xf0000000    0x20000000    MIPS-III
  4625. >>>>48  lelong&0xf0000000    0x30000000    MIPS-IV
  4626. >>>>48  lelong&0xf0000000    0x40000000    MIPS-V
  4627. >>>>48  lelong&0xf0000000    0x50000000    MIPS32
  4628. >>>>48  lelong&0xf0000000    0x60000000    MIPS64
  4629. >>>>48  lelong&0xf0000000    0x70000000    MIPS32 rel2
  4630. >>>>48  lelong&0xf0000000    0x80000000    MIPS64 rel2
  4631. >>18    leshort        9        Amdahl - invalid byte order,
  4632. >>18    leshort        10        MIPS (deprecated),
  4633. >>18    leshort        11        RS6000 - invalid byte order,
  4634. >>18    leshort        15        PA-RISC - invalid byte order,
  4635. >>>50    leshort        0x0214        2.0
  4636. >>>48    leshort        &0x0008        (LP64),
  4637. >>18    leshort        16        nCUBE,
  4638. >>18    leshort        17        Fujitsu VPP500,
  4639. >>18    leshort        18        SPARC32PLUS,
  4640. >>18    leshort        20        PowerPC,
  4641. >>18    leshort        22        IBM S/390,
  4642. >>18    leshort        36        NEC V800,
  4643. >>18    leshort        37        Fujitsu FR20,
  4644. >>18    leshort        38        TRW RH-32,
  4645. >>18    leshort        39        Motorola RCE,
  4646. >>18    leshort        40        ARM,
  4647. >>18    leshort        41        Alpha,
  4648. >>18    leshort        0xa390        IBM S/390 (obsolete),
  4649. >>18    leshort        42        Renesas SH,
  4650. >>18    leshort        43        SPARC V9 - invalid byte order,
  4651. >>18    leshort        44        Siemens Tricore Embedded Processor,
  4652. >>18    leshort        45        Argonaut RISC Core, Argonaut Technologies Inc.,
  4653. >>18    leshort        46        Renesas H8/300,
  4654. >>18    leshort        47        Renesas H8/300H,
  4655. >>18    leshort        48        Renesas H8S,
  4656. >>18    leshort        49        Renesas H8/500,
  4657. >>18    leshort        50        IA-64,
  4658. >>18    leshort        51        Stanford MIPS-X,
  4659. >>18    leshort        52        Motorola Coldfire,
  4660. >>18    leshort        53        Motorola M68HC12,
  4661. >>18    leshort        54        Fujitsu MMA,
  4662. >>18    leshort        55        Siemens PCP,
  4663. >>18    leshort        56        Sony nCPU,
  4664. >>18    leshort        57        Denso NDR1,
  4665. >>18    leshort        58        Start*Core,
  4666. >>18    leshort        59        Toyota ME16,
  4667. >>18    leshort        60        ST100,
  4668. >>18    leshort        61        Tinyj emb.,
  4669. >>18    leshort        62        x86-64,
  4670. >>18    leshort        63        Sony DSP,
  4671. >>18    leshort        66        FX66,
  4672. >>18    leshort        67        ST9+ 8/16 bit,
  4673. >>18    leshort        68        ST7 8 bit,
  4674. >>18    leshort        69        MC68HC16,
  4675. >>18    leshort        70        MC68HC11,
  4676. >>18    leshort        71        MC68HC08,
  4677. >>18    leshort        72        MC68HC05,
  4678. >>18    leshort        73        SGI SVx,
  4679. >>18    leshort        74        ST19 8 bit,
  4680. >>18    leshort        75        Digital VAX,
  4681. >>18    leshort        76        Axis cris,
  4682. >>18    leshort        77        Infineon 32-bit embedded,
  4683. >>18    leshort        78        Element 14 64-bit DSP,
  4684. >>18    leshort        79        LSI Logic 16-bit DSP,
  4685. >>18    leshort        80        MMIX,
  4686. >>18    leshort        81        Harvard machine-independent,
  4687. >>18    leshort        82        SiTera Prism,
  4688. >>18    leshort        83        Atmel AVR 8-bit,
  4689. >>18    leshort        84        Fujitsu FR30,
  4690. >>18    leshort        85        Mitsubishi D10V,
  4691. >>18    leshort        86        Mitsubishi D30V,
  4692. >>18    leshort        87        NEC v850,
  4693. >>18    leshort        88        Renesas M32R,
  4694. >>18    leshort        89        Matsushita MN10300,
  4695. >>18    leshort        90        Matsushita MN10200,
  4696. >>18    leshort        91        picoJava,
  4697. >>18    leshort        92        OpenRISC,
  4698. >>18    leshort        93        ARC Cores Tangent-A5,
  4699. >>18    leshort        0x3426        OpenRISC (obsolete),
  4700. >>18    leshort        0x8472        OpenRISC (obsolete),
  4701. >>18    leshort        94        Tensilica Xtensa,
  4702. >>18    leshort        97        NatSemi 32k,
  4703. >>18    leshort        106        Analog Devices Blackfin,
  4704. >>18    leshort        0x9026        Alpha (unofficial),
  4705. >>20    lelong        0        invalid version
  4706. >>20    lelong        1        version 1
  4707. >>36    lelong        1        MathCoPro/FPU/MAU Required
  4708. >5    byte        2        MSB
  4709. >>16    beshort        0        no file type,
  4710. !:mime    application/octet-stream
  4711. >>16    beshort        1        relocatable,
  4712. !:mime    application/x-object
  4713. >>16    beshort        2        executable,
  4714. !:mime    application/x-executable
  4715. >>16    beshort        3        shared object,
  4716. !:mime    application/x-sharedlib
  4717. >>16    beshort        4        core file,
  4718. !:mime    application/x-coredump
  4719. #>>>(0x38+0xcc) string    >\0        of '%s'
  4720. #>>>(0x38+0x10) belong    >0        (signal %d),
  4721. >>16    beshort        &0xff00        processor-specific,
  4722. >>18    beshort        0        no machine,
  4723. >>18    beshort        1        AT&T WE32100,
  4724. >>18    beshort        2        SPARC,
  4725. >>18    beshort        3        Intel 80386 - invalid byte order,
  4726. >>18    beshort        4        Motorola
  4727. >>>36    belong        &0x01000000    68000,
  4728. >>>36    belong        &0x00810000    CPU32,
  4729. >>>36    belong        0        68020,
  4730. >>18    beshort        5        Motorola 88000,
  4731. >>18    beshort        6        Intel 80486 - invalid byte order,
  4732. >>18    beshort        7        Intel 80860,
  4733. # only for MIPS - see comment in little-endian section above.
  4734. >>18    beshort        8        MIPS,
  4735. >>>36    belong        &0x20        N32
  4736. >>18    beshort        10        MIPS,
  4737. >>>36    belong        &0x20        N32
  4738. >>18    beshort        8
  4739. # only for 32-bit
  4740. >>>4    byte        1
  4741. >>>>36  belong&0xf0000000    0x00000000    MIPS-I
  4742. >>>>36  belong&0xf0000000    0x10000000    MIPS-II
  4743. >>>>36  belong&0xf0000000    0x20000000    MIPS-III
  4744. >>>>36  belong&0xf0000000    0x30000000    MIPS-IV
  4745. >>>>36  belong&0xf0000000    0x40000000    MIPS-V
  4746. >>>>36  belong&0xf0000000    0x50000000    MIPS32
  4747. >>>>36  belong&0xf0000000    0x60000000    MIPS64
  4748. >>>>36  belong&0xf0000000    0x70000000    MIPS32 rel2
  4749. >>>>36  belong&0xf0000000    0x80000000    MIPS64 rel2
  4750. # only for 64-bit
  4751. >>>4    byte        2
  4752. >>>>48    belong&0xf0000000    0x00000000    MIPS-I
  4753. >>>>48    belong&0xf0000000    0x10000000    MIPS-II
  4754. >>>>48    belong&0xf0000000    0x20000000    MIPS-III
  4755. >>>>48    belong&0xf0000000    0x30000000    MIPS-IV
  4756. >>>>48    belong&0xf0000000    0x40000000    MIPS-V
  4757. >>>>48    belong&0xf0000000    0x50000000    MIPS32
  4758. >>>>48    belong&0xf0000000    0x60000000    MIPS64
  4759. >>>>48    belong&0xf0000000    0x70000000    MIPS32 rel2
  4760. >>>>48    belong&0xf0000000    0x80000000    MIPS64 rel2
  4761. >>18    beshort        9        Amdahl,
  4762. >>18    beshort        10        MIPS (deprecated),
  4763. >>18    beshort        11        RS6000,
  4764. >>18    beshort        15        PA-RISC
  4765. >>>50    beshort        0x0214        2.0
  4766. >>>48    beshort        &0x0008        (LP64)
  4767. >>18    beshort        16        nCUBE,
  4768. >>18    beshort        17        Fujitsu VPP500,
  4769. >>18    beshort        18        SPARC32PLUS,
  4770. >>>36    belong&0xffff00    &0x000100    V8+ Required,
  4771. >>>36    belong&0xffff00    &0x000200    Sun UltraSPARC1 Extensions Required,
  4772. >>>36    belong&0xffff00    &0x000400    HaL R1 Extensions Required,
  4773. >>>36    belong&0xffff00    &0x000800    Sun UltraSPARC3 Extensions Required,
  4774. >>18    beshort        20        PowerPC or cisco 4500,
  4775. >>18    beshort        21        64-bit PowerPC or cisco 7500,
  4776. >>18    beshort        22        IBM S/390,
  4777. >>18    beshort        23        Cell SPU,
  4778. >>18    beshort        24        cisco SVIP,
  4779. >>18    beshort        25        cisco 7200,
  4780. >>18    beshort        36        NEC V800 or cisco 12000,
  4781. >>18    beshort        37        Fujitsu FR20,
  4782. >>18    beshort        38        TRW RH-32,
  4783. >>18    beshort        39        Motorola RCE,
  4784. >>18    beshort        40        ARM,
  4785. >>18    beshort        41        Alpha,
  4786. >>18    beshort        42        Renesas SH,
  4787. >>18    beshort        43        SPARC V9,
  4788. >>18    beshort        44        Siemens Tricore Embedded Processor,
  4789. >>18    beshort        45        Argonaut RISC Core, Argonaut Technologies Inc.,
  4790. >>18    beshort        46        Renesas H8/300,
  4791. >>18    beshort        47        Renesas H8/300H,
  4792. >>18    beshort        48        Renesas H8S,
  4793. >>18    beshort        49        Renesas H8/500,
  4794. >>18    beshort        50        IA-64,
  4795. >>18    beshort        51        Stanford MIPS-X,
  4796. >>18    beshort        52        Motorola Coldfire,
  4797. >>18    beshort        53        Motorola M68HC12,
  4798. >>18    beshort        73        Cray NV1,
  4799. >>18    beshort        75        Digital VAX,
  4800. >>18    beshort        88        Renesas M32R,
  4801. >>18    leshort        92        OpenRISC,
  4802. >>18    leshort        0x3426        OpenRISC (obsolete),
  4803. >>18    leshort        0x8472        OpenRISC (obsolete),
  4804. >>18    beshort        94        Tensilica Xtensa,
  4805. >>18    beshort        97        NatSemi 32k,
  4806. >>18    beshort        0x18ad        AVR32 (unofficial),
  4807. >>18    beshort        0x9026        Alpha (unofficial),
  4808. >>18    beshort        0xa390        IBM S/390 (obsolete),
  4809. >>20    belong        0        invalid version
  4810. >>20    belong        1        version 1
  4811. >>36    belong        1        MathCoPro/FPU/MAU Required
  4812. # Up to now only 0, 1 and 2 are defined; I've seen a file with 0x83, it seemed
  4813. # like proper ELF, but extracting the string had bad results.
  4814. >4      byte            <0x80
  4815. >>8    string        >\0        (%s)
  4816. >8    string        \0
  4817. >>7    byte        0        (SYSV)
  4818. >>7    byte        1        (HP-UX)
  4819. >>7    byte        2        (NetBSD)
  4820. >>7    byte        3        (GNU/Linux)
  4821. >>7    byte        4        (GNU/Hurd)
  4822. >>7    byte        5        (86Open)
  4823. >>7    byte        6        (Solaris)
  4824. >>7    byte        7        (Monterey)
  4825. >>7    byte        8        (IRIX)
  4826. >>7    byte        9        (FreeBSD)
  4827. >>7    byte        10        (Tru64)
  4828. >>7    byte        11        (Novell Modesto)
  4829. >>7    byte        12        (OpenBSD)
  4830. # VMS Itanium added by gerardo.cacciari@gmail.com
  4831. >8      string          \2
  4832. >>7     byte            13              (OpenVMS)
  4833. >>7    byte        97        (ARM)
  4834. >>7    byte        255        (embedded)
  4835.  
  4836. #------------------------------------------------------------------------------
  4837. # encore:  file(1) magic for Encore machines
  4838. #
  4839. # XXX - needs to have the byte order specified (NS32K was little-endian,
  4840. # dunno whether they run the 88K in little-endian mode or not).
  4841. #
  4842. 0    short        0x154        Encore
  4843. >20    short        0x107        executable
  4844. >20    short        0x108        pure executable
  4845. >20    short        0x10b        demand-paged executable
  4846. >20    short        0x10f        unsupported executable
  4847. >12    long        >0        not stripped
  4848. >22    short        >0        - version %ld
  4849. >22    short        0        -
  4850. #>4    date        x        stamp %s
  4851. 0    short        0x155        Encore unsupported executable
  4852. >12    long        >0        not stripped
  4853. >22    short        >0        - version %ld
  4854. >22    short        0        -
  4855. #>4    date        x        stamp %s
  4856.  
  4857. #------------------------------------------------------------------------------
  4858. # Epoc 32 : file(1) magic for Epoc Documents [psion/osaris
  4859. # Stefan Praszalowicz (hpicollo@worldnet.fr)
  4860. #0    lelong        0x10000037    Epoc32
  4861. >4    lelong        0x1000006D
  4862. >>8    lelong        0x1000007F    Word
  4863. >>8    lelong        0x10000088    Sheet
  4864. >>8    lelong        0x1000007D    Sketch
  4865. >>8    lelong        0x10000085    TextEd
  4866.  
  4867. #------------------------------------------------------------------------------
  4868. # erlang:  file(1) magic for Erlang JAM and BEAM files
  4869. # URL:  http://www.erlang.org/faq/x779.html#AEN812
  4870.  
  4871. # OTP R3-R4
  4872. 0    string    \0177BEAM!    Old Erlang BEAM file
  4873. >6    short    >0        - version %d
  4874.  
  4875. # OTP R5 and onwards
  4876. 0    string    FOR1
  4877. >8    string    BEAM        Erlang BEAM file
  4878.  
  4879. # 4.2 version may have a copyright notice!
  4880. 4    string    Tue Jan 22 14:32:44 MET 1991    Erlang JAM file - version 4.2
  4881. 79    string    Tue Jan 22 14:32:44 MET 1991    Erlang JAM file - version 4.2
  4882.  
  4883. 4    string    1.0 Fri Feb 3 09:55:56 MET 1995    Erlang JAM file - version 4.3
  4884.  
  4885. #------------------------------------------------------------------------------
  4886. # ESRI Shapefile format (.shp .shx .dbf=DBaseIII)
  4887. # Based on info from
  4888. # <URL:http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf>
  4889. 0    belong    9994    ESRI Shapefile
  4890. >4    belong    =0
  4891. >8    belong    =0
  4892. >12    belong    =0
  4893. >16    belong    =0
  4894. >20    belong    =0
  4895. >28    lelong    x    version %d
  4896. >24    belong    x    length %d
  4897. >32    lelong    =0    type Null Shape
  4898. >32    lelong    =1    type Point
  4899. >32    lelong    =3    type PolyLine
  4900. >32    lelong    =5    type Polygon
  4901. >32    lelong    =8    type MultiPoint
  4902. >32    lelong    =11    type PointZ
  4903. >32    lelong    =13    type PolyLineZ
  4904. >32    lelong    =15    type PolygonZ
  4905. >32    lelong    =18    type MultiPointZ
  4906. >32    lelong    =21    type PointM
  4907. >32    lelong    =23    type PolyLineM
  4908. >32    lelong    =25    type PolygonM
  4909. >32    lelong    =28    type MultiPointM
  4910. >32    lelong    =31    type MultiPatch
  4911.  
  4912. #------------------------------------------------------------------------------
  4913. # fcs: file(1) magic for FCS (Flow Cytometry Standard) data files
  4914. # From Roger Leigh <roger@whinlatter.uklinux.net>
  4915. 0       string          FCS1.0          Flow Cytometry Standard (FCS) data, version 1.0
  4916. 0       string          FCS2.0          Flow Cytometry Standard (FCS) data, version 2.0
  4917. 0       string          FCS3.0          Flow Cytometry Standard (FCS) data, version 3.0
  4918.  
  4919.  
  4920. #------------------------------------------------------------------------------
  4921. # filesystems:  file(1) magic for different filesystems
  4922. #
  4923. 0    string    \366\366\366\366    PC formatted floppy with no filesystem
  4924. # Sun disk labels
  4925. # From /usr/include/sun/dklabel.h:
  4926. 0774    beshort        0xdabe        
  4927. # modified by Joerg Jenderek, because original test
  4928. # succeeds for Cabinet archive dao360.dl_ with negative blocks
  4929. >0770    long        >0        Sun disk label
  4930. >>0    string        x        '%s
  4931. >>>31    string        >\0        \b%s
  4932. >>>>63    string        >\0        \b%s
  4933. >>>>>95    string        >\0        \b%s
  4934. >>0    string        x        \b'
  4935. >>0734    short        >0        %d rpm,
  4936. >>0736    short        >0        %d phys cys,
  4937. >>0740    short        >0        %d alts/cyl,
  4938. >>0746    short        >0        %d interleave,
  4939. >>0750    short        >0        %d data cyls,
  4940. >>0752    short        >0        %d alt cyls,
  4941. >>0754    short        >0        %d heads/partition,
  4942. >>0756    short        >0        %d sectors/track,
  4943. >>0764    long        >0        start cyl %ld,
  4944. >>0770    long        x        %ld blocks
  4945. # Is there a boot block written 1 sector in?
  4946. >512    belong&077777777    0600407    \b, boot block present
  4947. # Joerg Jenderek: Smart Boot Manager backup file is 41 byte header + first sectors of disc
  4948. # (http://btmgr.sourceforge.net/docs/user-guide-3.html)
  4949. 0        string    SBMBAKUP_    Smart Boot Manager backup file
  4950. >9        string    x        \b, version %-5.5s
  4951. >>14        string    =_        
  4952. >>>15        string    x        %-.1s
  4953. >>>>16        string    =_        \b.
  4954. >>>>>17        string    x        \b%-.1s
  4955. >>>>>>18    string    =_        \b.
  4956. >>>>>>>19    string    x        \b%-.1s
  4957. >>>22        ubyte    0        
  4958. >>>>21        ubyte    x        \b, from drive 0x%x
  4959. >>>22        ubyte    >0        
  4960. >>>>21        string    x        \b, from drive %s
  4961.  
  4962. # Joerg Jenderek
  4963. # DOS Emulator image is 128 byte, null right padded header + harddisc image
  4964. 0    string    DOSEMU\0            
  4965. >0x27E    leshort    0xAA55            
  4966. #offset is 128
  4967. >>19    ubyte    128            
  4968. >>>(19.b-1)    ubyte    0x0    DOS Emulator image
  4969. >>>>7    ulelong    >0        \b, %u heads
  4970. >>>>11    ulelong    >0        \b, %d sectors/track
  4971. >>>>15    ulelong    >0        \b, %d cylinders
  4972.  
  4973. # updated by Joerg Jenderek at Sep 2007
  4974. # only for sector sizes with 512 or more Bytes
  4975. 0x1FE    leshort    0xAA55            x86 boot sector
  4976. # to do also for sectors < than 512 Bytes and some other files, GRR
  4977. #30    search/481    \x55\xAA    x86 boot sector
  4978. # not for BeOS floppy 1440k, MBRs
  4979. #(11.s-2) uleshort    0xAA55        x86 boot sector
  4980. >2    string    OSBS            \b, OS/BS MBR
  4981. # J\xf6rg Jenderek <joerg dot jenderek at web dot de>
  4982. >0x8C    string    Invalid\ partition\ table    \b, MS-DOS MBR
  4983. # dr-dos with some upper-, lowercase variants
  4984. >0x9D    string    Invalid\ partition\ table$    
  4985. >>181    string    No\ Operating\ System$        
  4986. >>>201    string    Operating\ System\ load\ error$    \b, DR-DOS MBR, Version 7.01 to 7.03
  4987. >0x9D    string    Invalid\ partition\ table$    
  4988. >>181    string    No\ operating\ system$        
  4989. >>>201    string    Operating\ system\ load\ error$    \b, DR-DOS MBR, Version 7.01 to 7.03
  4990. >342    string    Invalid\ partition\ table$    
  4991. >>366    string    No\ operating\ system$        
  4992. >>>386    string    Operating\ system\ load\ error$    \b, DR-DOS MBR, version 7.01 to 7.03
  4993. >295    string    NEWLDR\0                
  4994. >>302    string    Bad\ PT\ $                
  4995. >>>310    string    No\ OS\ $                
  4996. >>>>317    string    OS\ load\ err$                
  4997. >>>>>329    string    Moved\ or\ missing\ IBMBIO.LDR\n\r    
  4998. >>>>>>358    string    Press\ any\ key\ to\ continue.\n\r$    
  4999. >>>>>>>387    string    Copyright\ (c)\ 1984,1998    
  5000. >>>>>>>>411    string    Caldera\ Inc.\0        \b, DR-DOS MBR (IBMBIO.LDR)
  5001. >0x10F    string    Ung\201ltige\ Partitionstabelle    \b, MS-DOS MBR, german version 4.10.1998, 4.10.2222
  5002. >>0x1B8    ubelong    >0                \b, Serial 0x%-.4x
  5003. >0x8B    string    Ung\201ltige\ Partitionstabelle    \b, MS-DOS MBR, german version 5.00 to 4.00.950
  5004. >271    string    Invalid\ partition\ table\0        
  5005. >>295    string    Error\ loading\ operating\ system\0    
  5006. >>>326    string    Missing\ operating\ system\0        \b, mbr
  5007. #
  5008. >139    string    Invalid\ partition\ table\0        
  5009. >>163    string    Error\ loading\ operating\ system\0    
  5010. >>>194    string    Missing\ operating\ system\0        \b, Microsoft Windows XP mbr
  5011. # http://www.heise.de/ct/05/09/006/ page 184
  5012. #HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices\DosDevices\?:=Serial4Bytes+8Bytes
  5013. >>>>0x1B8    ulelong    >0                \b,Serial 0x%-.4x
  5014. >300    string    Invalid\ partition\ table\0    
  5015. >>324    string    Error\ loading\ operating\ system\0
  5016. >>>355    string    Missing\ operating\ system\0        \b, Microsoft Windows XP MBR
  5017. #??>>>389    string    Invalid\ system\ disk        
  5018. >>>>0x1B8    ulelong    >0                \b, Serial 0x%-.4x
  5019. >300    string    Ung\201ltige\ Partitionstabelle
  5020. #split string to avoid error: String too long
  5021. >>328    string    Fehler\ beim\ Laden\     
  5022. >>>346    string    des\ Betriebssystems    
  5023. >>>>366    string    Betriebssystem\ nicht\ vorhanden    \b, Microsoft Windows XP MBR (german)
  5024. >>>>>0x1B8    ulelong    >0                \b, Serial 0x%-.4x
  5025. >0x145    string    Default:\ F                \b, FREE-DOS MBR
  5026. >64    string    no\ active\ partition\ found    
  5027. >>96    string    read\ error\ while\ reading\ drive    \b, FREE-DOS Beta 0.9 MBR
  5028. >271    string    Operating\ system\ loading         
  5029. >>296    string    error\r                    \b, SYSLINUX MBR (2.10)
  5030. # http://www.acronis.de/
  5031. >362    string    MBR\ Error\ \0\r            
  5032. >>376    string    ress\ any\ key\ to\             
  5033. >>>392    string    boot\ from\ floppy...\0            \b, Acronis MBR
  5034. # added by Joerg Jenderek
  5035. # http://www.visopsys.org/
  5036. # http://partitionlogic.org.uk/
  5037. >309    string    No\ bootable\ partition\ found\r    
  5038. >>339    string    I/O\ Error\ reading\ boot\ sector\r    \b, Visopsys MBR
  5039. >349    string    No\ bootable\ partition\ found\r    
  5040. >>379    string    I/O\ Error\ reading\ boot\ sector\r    \b, simple Visopsys MBR
  5041. # bootloader, bootmanager
  5042. >0x40    string    SBML                
  5043. # label with 11 characters of FAT 12 bit filesystem
  5044. >>43    string    SMART\ BTMGR            
  5045. >>>430    string    SBMK\ Bad!\r            
  5046. >>>>3    string    SBM                \b, Smart Boot Manager
  5047. >>>>>6    string    >\0                             \b, version %s
  5048. >382    string    XOSLLOADXCF            \b, eXtended Operating System Loader
  5049. >6    string    LILO                \b, LInux i386 boot LOader
  5050. >>120    string    LILO                \b, version 22.3.4 SuSe
  5051. >>172    string    LILO                \b, version 22.5.8 Debian
  5052. # updated by Joerg Jenderek
  5053. # variables according to grub-0.97/stage1/stage1.S or
  5054. # http://www.gnu.org/software/grub/manual/grub.html#Embedded-data
  5055. # usual values are marked with comments to get only informations of strange GRUB loaders
  5056. >0        ulelong        0x009048EB    
  5057. >>0x41        ubyte        <2        
  5058. >>>0x3E        ubyte        >2        \b; GRand Unified Bootloader
  5059. # 0x3 for 0.5.95,0.93,0.94,0.96 0x4 for 1.90 
  5060. >>>>0x3E    ubyte        x        \b, stage1 version 0x%x
  5061. #If it is 0xFF, use a drive passed by BIOS
  5062. >>>>0x40    ubyte        <0xFF        \b, boot drive 0x%x
  5063. # in most case 0,1,0x2e for GRUB 0.5.95
  5064. >>>>0x41    ubyte        >0        \b, LBA flag 0x%x
  5065. >>>>0x42    uleshort    <0x8000        \b, stage2 address 0x%x
  5066. #>>>>0x42    uleshort    =0x8000        \b, stage2 address 0x%x (usual)
  5067. >>>>0x42    uleshort    >0x8000        \b, stage2 address 0x%x
  5068. #>>>>0x44    ulelong        =1        \b, 1st sector stage2 0x%x (default)
  5069. >>>>0x44    ulelong        >1        \b, 1st sector stage2 0x%x
  5070. >>>>0x48    uleshort    <0x800        \b, stage2 segment 0x%x
  5071. #>>>>0x48    uleshort    =0x800        \b, stage2 segment 0x%x (usual)
  5072. >>>>0x48    uleshort    >0x800        \b, stage2 segment 0x%x
  5073. >>>>402        string    Geom\0Hard\ Disk\0Read\0\ Error\0
  5074. >>>>>394    string    stage1            \b, GRUB version 0.5.95
  5075. >>>>382        string    Geom\0Hard\ Disk\0Read\0\ Error\0
  5076. >>>>>376    string    GRUB\ \0        \b, GRUB version 0.93 or 1.94
  5077. >>>>383        string    Geom\0Hard\ Disk\0Read\0\ Error\0
  5078. >>>>>377    string    GRUB\ \0        \b, GRUB version 0.94
  5079. >>>>385        string    Geom\0Hard\ Disk\0Read\0\ Error\0
  5080. >>>>>379    string    GRUB\ \0        \b, GRUB version 0.95 or 0.96
  5081. >>>>391        string    Geom\0Hard\ Disk\0Read\0\ Error\0
  5082. >>>>>385    string    GRUB\ \0        \b, GRUB version 0.97
  5083. #unkown version
  5084. >>>343        string    Geom\0Read\0\ Error\0    
  5085. >>>>321        string    Loading\ stage1.5    \b, GRUB version x.y
  5086. >>>380        string    Geom\0Hard\ Disk\0Read\0\ Error\0
  5087. >>>>374        string    GRUB\ \0        \b, GRUB version n.m
  5088. # http://syslinux.zytor.com/
  5089. >478    string    Boot\ failed\r            
  5090. >>495    string    LDLINUX\ SYS            \b, SYSLINUX bootloader (1.62)
  5091. >480    string    Boot\ failed\r            
  5092. >>495    string    LDLINUX\ SYS            \b, SYSLINUX bootloader (2.06 or 2.11)
  5093. >484    string    Boot\ error\r            \b, SYSLINUX bootloader (3.11)
  5094. >395    string    chksum\0\ ERROR!\0        \b, Gujin bootloader
  5095. # http://www.bcdwb.de/bcdw/index_e.htm
  5096. >3    string    BCDL                
  5097. >>498    string    BCDL\ \ \ \ BIN            \b, Bootable CD Loader (1.50Z)
  5098. # mbr partion table entries
  5099. # OEM-ID not Microsoft,SYSLINUX,or MTOOLs
  5100. >3            string        !MS
  5101. >>3            string        !SYSLINUX
  5102. >>>3            string        !MTOOL
  5103. # not FAT (32 bit)
  5104. >>>>82            string        !FAT32    
  5105. #not IO.SYS
  5106. >>>>>472        string        !IO\ \ \ \ \ \ SYS
  5107. >>>>>>480        string        !IO\ \ \ \ \ \ SYS
  5108. #not Linux kernel
  5109. >>>>>>>514        string        !HdrS
  5110. #not BeOS
  5111. >>>>>>>>422        string        !Be\ Boot\ Loader
  5112. # active flag 0 or 0x80 and type > 0
  5113. >>>>>>>>>446        ubyte        <0x81    
  5114. >>>>>>>>>>446        ubyte&0x7F    0    
  5115. >>>>>>>>>>>450        ubyte        >0    \b; partition 1: ID=0x%x
  5116. >>>>>>>>>>>>446        ubyte        0x80    \b, active
  5117. >>>>>>>>>>>>447        ubyte        x    \b, starthead %u
  5118. #>>>>>>>>>>>>448        ubyte        x    \b, start C_S: 0x%x
  5119. #>>>>>>>>>>>>448        ubeshort&1023    x    \b, startcylinder? %d
  5120. >>>>>>>>>>>>454        ulelong        x    \b, startsector %u
  5121. >>>>>>>>>>>>458        ulelong        x    \b, %u sectors
  5122. #
  5123. >>>>>>>>>462        ubyte        <0x81    
  5124. >>>>>>>>>>462        ubyte&0x7F    0        
  5125. >>>>>>>>>>>466        ubyte        >0    \b; partition 2: ID=0x%x
  5126. >>>>>>>>>>>>462        ubyte        0x80    \b, active
  5127. >>>>>>>>>>>>463        ubyte        x    \b, starthead %u
  5128. #>>>>>>>>>>>>464        ubyte        x    \b, start C_S: 0x%x
  5129. #>>>>>>>>>>>>464        ubeshort&1023    x    \b, startcylinder? %d
  5130. >>>>>>>>>>>>470        ulelong        x    \b, startsector %u
  5131. >>>>>>>>>>>>474        ulelong        x    \b, %u sectors
  5132. #
  5133. >>>>>>>>>478        ubyte        <0x81        
  5134. >>>>>>>>>>478        ubyte&0x7F    0        
  5135. >>>>>>>>>>>482        ubyte        >0    \b; partition 3: ID=0x%x
  5136. >>>>>>>>>>>>478        ubyte        0x80    \b, active
  5137. >>>>>>>>>>>>479        ubyte        x    \b, starthead %u
  5138. #>>>>>>>>>>>>480        ubyte        x    \b, start C_S: 0x%x
  5139. #>>>>>>>>>>>>481        ubyte        x    \b, start C2S: 0x%x
  5140. #>>>>>>>>>>>>480        ubeshort&1023    x    \b, startcylinder? %d
  5141. >>>>>>>>>>>>486        ulelong        x    \b, startsector %u
  5142. >>>>>>>>>>>>490        ulelong        x    \b, %u sectors
  5143. #
  5144. >>>>>>>>>494        ubyte        <0x81    
  5145. >>>>>>>>>>494        ubyte&0x7F    0        
  5146. >>>>>>>>>>>498        ubyte        >0    \b; partition 4: ID=0x%x
  5147. >>>>>>>>>>>>494        ubyte        0x80    \b, active
  5148. >>>>>>>>>>>>495        ubyte        x    \b, starthead %u
  5149. #>>>>>>>>>>>>496        ubyte        x    \b, start C_S: 0x%x
  5150. #>>>>>>>>>>>>496        ubeshort&1023    x    \b, startcylinder? %d
  5151. >>>>>>>>>>>>502        ulelong        x    \b, startsector %u
  5152. >>>>>>>>>>>>506        ulelong        x    \b, %u sectors
  5153. # mbr partion table entries end
  5154. # http://www.acronis.de/
  5155. #FAT label=ACRONIS\ SZ
  5156. #OEM-ID=BOOTWIZ0
  5157. >442    string    Non-system\ disk,\     
  5158. >>459    string    press\ any\ key...\x7\0        \b, Acronis Startup Recovery Loader
  5159. # DOS names like F11.SYS are 8 right space padded bytes+3 bytes
  5160. >>>477        ubyte&0xDF    >0        
  5161. >>>>477        string        x         \b %-.3s
  5162. >>>>>480    ubyte&0xDF    >0        
  5163. >>>>>>480    string        x         \b%-.5s
  5164. >>>>485        ubyte&0xDF    >0        
  5165. >>>>>485    string        x         \b.%-.3s
  5166. #
  5167. >185    string    FDBOOT\ Version\             
  5168. >>204    string    \rNo\ Systemdisk.\             
  5169. >>>220    string    Booting\ from\ harddisk.\n\r        
  5170. >>>245    string    Cannot\ load\ from\ harddisk.\n\r    
  5171. >>>>273 string    Insert\ Systemdisk\             
  5172. >>>>>291 string and\ press\ any\ key.\n\r        \b, FDBOOT harddisk Bootloader
  5173. >>>>>>200 string    >\0                             \b, version %-3s
  5174. >242    string    Bootsector\ from\ C.H.\ Hochst\204    
  5175. >>278    string    No\ Systemdisk.\             
  5176. >>>293    string    Booting\ from\ harddisk.\n\r        
  5177. >>>441    string    Cannot\ load\ from\ harddisk.\n\r    
  5178. >>>>469 string    Insert\ Systemdisk\             
  5179. >>>>>487 string and\ press\ any\ key.\n\r        \b, WinImage harddisk Bootloader
  5180. >>>>>>209 string    >\0                             \b, version %-4.4s
  5181. >(1.b+2)    ubyte        0xe            
  5182. >>(1.b+3)    ubyte        0x1f            
  5183. >>>(1.b+4)    ubyte        0xbe            
  5184. >>>>(1.b+5)    ubyte        0x77            
  5185. >>>>(1.b+6)    ubyte        0x7c            
  5186. >>>>>(1.b+7)    ubyte        0xac            
  5187. >>>>>>(1.b+8)    ubyte        0x22            
  5188. >>>>>>>(1.b+9)    ubyte        0xc0            
  5189. >>>>>>>>(1.b+10)    ubyte    0x74            
  5190. >>>>>>>>>(1.b+11)    ubyte    0xb            
  5191. >>>>>>>>>>(1.b+12)    ubyte    0x56            
  5192. >>>>>>>>>>(1.b+13)    ubyte    0xb4            \b, mkdosfs boot message display
  5193. >103    string    This\ is\ not\ a\ bootable\ disk.\     
  5194. >>132    string    Please\ insert\ a\ bootable\         
  5195. >>>157    string    floppy\ and\r\n                
  5196. >>>>169    string    press\ any\ key\ to\ try\ again...\r    \b, FREE-DOS message display
  5197. #
  5198. >66    string    Solaris\ Boot\ Sector            
  5199. >>99    string    Incomplete\ MDBoot\ load.        
  5200. >>>89    string    Version                 \b, Sun Solaris Bootloader
  5201. >>>>97    byte    x                    version %c
  5202. #
  5203. >408    string    OS/2\ !!\ SYS01475\r\0            
  5204. >>429    string    OS/2\ !!\ SYS02025\r\0            
  5205. >>>450    string    OS/2\ !!\ SYS02027\r\0            
  5206. >>>469    string    OS2BOOT\ \ \ \                 \b, IBM OS/2 Warp bootloader
  5207. #
  5208. >409    string    OS/2\ !!\ SYS01475\r\0            
  5209. >>430    string    OS/2\ !!\ SYS02025\r\0            
  5210. >>>451    string    OS/2\ !!\ SYS02027\r\0            
  5211. >>>470    string    OS2BOOT\ \ \ \                 \b, IBM OS/2 Warp Bootloader
  5212. >112        string    This\ disk\ is\ not\ bootable\r            
  5213. >>142        string    If\ you\ wish\ to\ make\ it\ bootable        
  5214. >>>176        string    run\ the\ DOS\ program\ SYS\              
  5215. >>>200        string    after\ the\r                    
  5216. >>>>216        string    system\ has\ been\ loaded\r\n            
  5217. >>>>>242    string    Please\ insert\ a\ DOS\ diskette\         
  5218. >>>>>271    string    into\r\n\ the\ drive\ and\             
  5219. >>>>>>292    string    strike\ any\ key...\0        \b, IBM OS/2 Warp message display
  5220. # XP
  5221. >430    string    NTLDR\ is\ missing\xFF\r\n        
  5222. >>449    string    Disk\ error\xFF\r\n            
  5223. >>>462    string    Press\ any\ key\ to\ restart\r        \b, Microsoft Windows XP Bootloader
  5224. # DOS names like NTLDR,CMLDR,$LDR$ are 8 right space padded bytes+3 bytes
  5225. >>>>417        ubyte&0xDF    >0            
  5226. >>>>>417    string        x            %-.5s
  5227. >>>>>>422    ubyte&0xDF    >0            
  5228. >>>>>>>422    string        x             \b%-.3s
  5229. >>>>>425    ubyte&0xDF    >0            
  5230. >>>>>>425    string        >\             \b.%-.3s
  5231. #
  5232. >>>>371        ubyte        >0x20            
  5233. >>>>>368    ubyte&0xDF    >0            
  5234. >>>>>>368    string        x             %-.5s
  5235. >>>>>>>373    ubyte&0xDF    >0            
  5236. >>>>>>>>373    string        x             \b%-.3s
  5237. >>>>>>376    ubyte&0xDF    >0            
  5238. >>>>>>>376    string        x             \b.%-.3s
  5239. #
  5240. >430    string    NTLDR\ nicht\ gefunden\xFF\r\n        
  5241. >>453    string    Datentr\204gerfehler\xFF\r\n        
  5242. >>>473    string    Neustart\ mit\ beliebiger\ Taste\r    \b, Microsoft Windows XP Bootloader (german)
  5243. >>>>417        ubyte&0xDF    >0            
  5244. >>>>>417    string        x            %-.5s
  5245. >>>>>>422    ubyte&0xDF    >0            
  5246. >>>>>>>422    string        x             \b%-.3s
  5247. >>>>>425    ubyte&0xDF    >0            
  5248. >>>>>>425    string        >\             \b.%-.3s
  5249. # offset variant
  5250. >>>>379    string    \0                    
  5251. >>>>>368    ubyte&0xDF    >0            
  5252. >>>>>>368    string        x             %-.5s
  5253. >>>>>>>373    ubyte&0xDF    >0            
  5254. >>>>>>>>373    string        x             \b%-.3s
  5255. #
  5256. >430    string    NTLDR\ fehlt\xFF\r\n            
  5257. >>444    string    Datentr\204gerfehler\xFF\r\n        
  5258. >>>464    string    Neustart\ mit\ beliebiger\ Taste\r    \b, Microsoft Windows XP Bootloader (2.german)
  5259. >>>>417        ubyte&0xDF    >0            
  5260. >>>>>417    string        x            %-.5s
  5261. >>>>>>422    ubyte&0xDF    >0            
  5262. >>>>>>>422    string        x             \b%-.3s
  5263. >>>>>425    ubyte&0xDF    >0            
  5264. >>>>>>425    string        >\             \b.%-.3s
  5265. # variant
  5266. >>>>371        ubyte        >0x20            
  5267. >>>>>368    ubyte&0xDF    >0            
  5268. >>>>>>368    string        x             %-.5s
  5269. >>>>>>>373    ubyte&0xDF    >0            
  5270. >>>>>>>>373    string        x             \b%-.3s
  5271. >>>>>>376    ubyte&0xDF    >0            
  5272. >>>>>>>376    string        x             \b.%-.3s
  5273. #
  5274. >430    string    NTLDR\ fehlt\xFF\r\n            
  5275. >>444    string    Medienfehler\xFF\r\n            
  5276. >>>459    string    Neustart:\ Taste\ dr\201cken\r        \b, Microsoft Windows XP Bootloader (3.german)
  5277. >>>>371        ubyte        >0x20            
  5278. >>>>>368    ubyte&0xDF    >0            
  5279. >>>>>>368    string        x             %-.5s
  5280. >>>>>>>373    ubyte&0xDF    >0            
  5281. >>>>>>>>373    string        x             \b%-.3s
  5282. >>>>>>376    ubyte&0xDF    >0            
  5283. >>>>>>>376    string        x             \b.%-.3s
  5284. # variant
  5285. >>>>417        ubyte&0xDF    >0            
  5286. >>>>>417    string        x            %-.5s
  5287. >>>>>>422    ubyte&0xDF    >0            
  5288. >>>>>>>422    string        x             \b%-.3s
  5289. >>>>>425    ubyte&0xDF    >0            
  5290. >>>>>>425    string        >\             \b.%-.3s
  5291. #
  5292. >430    string    Datentr\204ger\ entfernen\xFF\r\n    
  5293. >>454    string    Medienfehler\xFF\r\n            
  5294. >>>469    string    Neustart:\ Taste\ dr\201cken\r        \b, Microsoft Windows XP Bootloader (4.german)
  5295. >>>>368        ubyte&0xDF    >0            
  5296. >>>>>368    string        x             %-.5s
  5297. >>>>>>373    ubyte&0xDF    >0            
  5298. >>>>>>>373    string        x             \b%-.3s
  5299. >>>>>376    ubyte&0xDF    >0            
  5300. >>>>>>376    string        x             \b.%-.3s
  5301. #>3    string    NTFS\ \ \ \                 
  5302. >389    string    Fehler\ beim\ Lesen\ 
  5303. >>407    string    des\ Datentr\204gers
  5304. >>>426    string    NTLDR\ fehlt                
  5305. >>>>440    string    NTLDR\ ist\ komprimiert
  5306. >>>>>464 string    Neustart\ mit\ Strg+Alt+Entf\r        \b, Microsoft Windows XP Bootloader NTFS (german)
  5307. #>3    string    NTFS\ \ \ \                 
  5308. >313    string    A\ disk\ read\ error\ occurred.\r
  5309. >>345    string    A\ kernel\ file\ is\ missing\     
  5310. >>>370    string    from\ the\ disk.\r        
  5311. >>>>484    string    NTLDR\ is\ compressed        
  5312. >>>>>429 string    Insert\ a\ system\ diskette\     
  5313. >>>>>>454 string and\ restart\r\nthe\ system.\r        \b, Microsoft Windows XP Bootloader NTFS
  5314. # DOS loader variants different languages,offsets
  5315. >472    ubyte&0xDF    >0
  5316. >>389    string    Invalid\ system\ disk\xFF\r\n        
  5317. >>>411    string    Disk\ I/O\ error            
  5318. >>>>428    string    Replace\ the\ disk,\ and\         
  5319. >>>>>455 string    press\ any\ key                \b, Microsoft Windows 98 Bootloader
  5320. #IO.SYS
  5321. >>>>>>472    ubyte&0xDF    >0            
  5322. >>>>>>>472    string        x             \b %-.2s
  5323. >>>>>>>>474    ubyte&0xDF    >0            
  5324. >>>>>>>>>474    string        x             \b%-.5s
  5325. >>>>>>>>>>479    ubyte&0xDF    >0            
  5326. >>>>>>>>>>>479 string        x             \b%-.1s
  5327. >>>>>>>480    ubyte&0xDF    >0            
  5328. >>>>>>>>480    string        x             \b.%-.3s
  5329. #MSDOS.SYS
  5330. >>>>>>>483    ubyte&0xDF    >0            \b+
  5331. >>>>>>>>483    string        x             \b%-.5s
  5332. >>>>>>>>>488    ubyte&0xDF    >0            
  5333. >>>>>>>>>>488    string        x             \b%-.3s
  5334. >>>>>>>>491    ubyte&0xDF    >0            
  5335. >>>>>>>>>491    string        x             \b.%-.3s
  5336. #
  5337. >>390    string    Invalid\ system\ disk\xFF\r\n        
  5338. >>>412    string    Disk\ I/O\ error\xFF\r\n        
  5339. >>>>429    string    Replace\ the\ disk,\ and\         
  5340. >>>>>451 string    then\ press\ any\ key\r            \b, Microsoft Windows 98 Bootloader
  5341. >>388    string    Ungueltiges\ System\ \xFF\r\n        
  5342. >>>410    string    E/A-Fehler\ \ \ \ \xFF\r\n        
  5343. >>>>427    string    Datentraeger\ wechseln\ und\         
  5344. >>>>>453 string    Taste\ druecken\r            \b, Microsoft Windows 95/98/ME Bootloader (german)
  5345. #WINBOOT.SYS only not spaces (0xDF)
  5346. >>>>>>497    ubyte&0xDF    >0            
  5347. >>>>>>>497    string        x             %-.5s
  5348. >>>>>>>>502    ubyte&0xDF    >0            
  5349. >>>>>>>>>502    string        x             \b%-.1s
  5350. >>>>>>>>>>503    ubyte&0xDF    >0            
  5351. >>>>>>>>>>>503    string        x             \b%-.1s
  5352. >>>>>>>>>>>>504    ubyte&0xDF    >0            
  5353. >>>>>>>>>>>>>504 string        x             \b%-.1s
  5354. >>>>>>505    ubyte&0xDF    >0            
  5355. >>>>>>>505    string        x             \b.%-.3s
  5356. #IO.SYS
  5357. >>>>>>472    ubyte&0xDF    >0            or
  5358. >>>>>>>472    string        x             \b %-.2s
  5359. >>>>>>>>474    ubyte&0xDF    >0            
  5360. >>>>>>>>>474    string        x             \b%-.5s
  5361. >>>>>>>>>>479    ubyte&0xDF    >0            
  5362. >>>>>>>>>>>479 string        x             \b%-.1s
  5363. >>>>>>>480    ubyte&0xDF    >0            
  5364. >>>>>>>>480    string        x             \b.%-.3s
  5365. #MSDOS.SYS
  5366. >>>>>>>483    ubyte&0xDF    >0            \b+
  5367. >>>>>>>>483    string        x             \b%-.5s
  5368. >>>>>>>>>488    ubyte&0xDF    >0            
  5369. >>>>>>>>>>488    string        x             \b%-.3s
  5370. >>>>>>>>491    ubyte&0xDF    >0            
  5371. >>>>>>>>>491    string        x             \b.%-.3s
  5372. #
  5373. >>390    string    Ungueltiges\ System\ \xFF\r\n        
  5374. >>>412    string    E/A-Fehler\ \ \ \ \xFF\r\n        
  5375. >>>>429    string    Datentraeger\ wechseln\ und\         
  5376. >>>>>455 string    Taste\ druecken\r            \b, Microsoft Windows 95/98/ME Bootloader (German)
  5377. #WINBOOT.SYS only not spaces (0xDF)
  5378. >>>>>>497    ubyte&0xDF    >0            
  5379. >>>>>>>497    string        x             %-.7s
  5380. >>>>>>>>504    ubyte&0xDF    >0            
  5381. >>>>>>>>>504    string        x             \b%-.1s
  5382. >>>>>>505    ubyte&0xDF    >0            
  5383. >>>>>>>505    string        x             \b.%-.3s
  5384. #IO.SYS
  5385. >>>>>>472    ubyte&0xDF    >0            or
  5386. >>>>>>>472    string        x             \b %-.2s
  5387. >>>>>>>>474    ubyte&0xDF    >0            
  5388. >>>>>>>>>474    string        x             \b%-.6s
  5389. >>>>>>>480    ubyte&0xDF    >0            
  5390. >>>>>>>>480    string        x             \b.%-.3s
  5391. #MSDOS.SYS
  5392. >>>>>>>483    ubyte&0xDF    >0            \b+
  5393. >>>>>>>>483    string        x             \b%-.5s
  5394. >>>>>>>>>488    ubyte&0xDF    >0            
  5395. >>>>>>>>>>488    string        x             \b%-.3s
  5396. >>>>>>>>491    ubyte&0xDF    >0            
  5397. >>>>>>>>>491    string        x             \b.%-.3s
  5398. #
  5399. >>389    string    Ungueltiges\ System\ \xFF\r\n        
  5400. >>>411    string    E/A-Fehler\ \ \ \ \xFF\r\n        
  5401. >>>>428    string    Datentraeger\ wechseln\ und\         
  5402. >>>>>454 string    Taste\ druecken\r            \b, Microsoft Windows 95/98/ME Bootloader (GERMAN)
  5403. # DOS names like IO.SYS,WINBOOT.SYS,MSDOS.SYS,WINBOOT.INI are 8 right space padded bytes+3 bytes
  5404. >>>>>>472    string        x             %-.2s
  5405. >>>>>>>474    ubyte&0xDF    >0            
  5406. >>>>>>>>474    string        x             \b%-.5s
  5407. >>>>>>>>479    ubyte&0xDF    >0            
  5408. >>>>>>>>>479    string        x             \b%-.1s
  5409. >>>>>>480    ubyte&0xDF    >0            
  5410. >>>>>>>480    string        x             \b.%-.3s
  5411. >>>>>>483    ubyte&0xDF    >0            \b+
  5412. >>>>>>>483    string        x             \b%-.5s
  5413. >>>>>>>488    ubyte&0xDF    >0            
  5414. >>>>>>>>488    string        x             \b%-.2s
  5415. >>>>>>>>490    ubyte&0xDF    >0            
  5416. >>>>>>>>>490    string        x             \b%-.1s
  5417. >>>>>>>491    ubyte&0xDF    >0            
  5418. >>>>>>>>491    string        x             \b.%-.3s
  5419. >479    ubyte&0xDF    >0
  5420. >>416    string    Kein\ System\ oder\             
  5421. >>>433    string    Laufwerksfehler                
  5422. >>>>450    string    Wechseln\ und\ Taste\ dr\201cken    \b, Microsoft DOS Bootloader (german)
  5423. #IO.SYS
  5424. >>>>>479    string        x             \b %-.2s
  5425. >>>>>>481    ubyte&0xDF    >0            
  5426. >>>>>>>481    string        x             \b%-.6s
  5427. >>>>>487    ubyte&0xDF    >0            
  5428. >>>>>>487    string        x             \b.%-.3s
  5429. #MSDOS.SYS
  5430. >>>>>>490    ubyte&0xDF    >0            \b+
  5431. >>>>>>>490    string        x             \b%-.5s
  5432. >>>>>>>>495    ubyte&0xDF    >0            
  5433. >>>>>>>>>495    string        x             \b%-.3s
  5434. >>>>>>>498    ubyte&0xDF    >0            
  5435. >>>>>>>>498    string        x             \b.%-.3s
  5436. #
  5437. >376    search/41    Non-System\ disk\ or\         
  5438. >>395    search/41    disk\ error\r            
  5439. >>>407    search/41    Replace\ and\             
  5440. >>>>419    search/41    press\                 \b,
  5441. >>>>419    search/41    strike\             \b, old
  5442. >>>>426    search/41    any\ key\ when\ ready\r        MS or PC-DOS bootloader
  5443. #449            Disk\ Boot\ failure\r        MS 3.21
  5444. #466            Boot\ Failure\r            MS 3.30
  5445. >>>>>468 search/18    \0                
  5446. #IO.SYS,IBMBIO.COM
  5447. >>>>>>&0    string        x             \b %-.2s
  5448. >>>>>>>&-20    ubyte&0xDF    >0            
  5449. >>>>>>>>&-1    string        x             \b%-.4s
  5450. >>>>>>>>>&-16    ubyte&0xDF    >0            
  5451. >>>>>>>>>>&-1    string        x             \b%-.2s
  5452. >>>>>>&8    ubyte&0xDF    >0            \b.
  5453. >>>>>>>&-1    string        x             \b%-.3s
  5454. #MSDOS.SYS,IBMDOS.COM
  5455. >>>>>>&11    ubyte&0xDF    >0            \b+
  5456. >>>>>>>&-1    string        x             \b%-.5s
  5457. >>>>>>>>&-6    ubyte&0xDF    >0            
  5458. >>>>>>>>>&-1    string        x             \b%-.1s
  5459. >>>>>>>>>>&-5    ubyte&0xDF    >0            
  5460. >>>>>>>>>>>&-1    string        x             \b%-.2s
  5461. >>>>>>>&7    ubyte&0xDF    >0            \b.
  5462. >>>>>>>>&-1    string        x             \b%-.3s
  5463. >441    string    Cannot\ load\ from\ harddisk.\n\r
  5464. >>469    string    Insert\ Systemdisk\             
  5465. >>>487    string    and\ press\ any\ key.\n\r        \b, MS (2.11) DOS bootloader
  5466. #>43    string    \224R-LOADER\ \ SYS            =label                    
  5467. >54    string    SYS
  5468. >>324    string    VASKK
  5469. >>>495    string    NEWLDR\0                \b, DR-DOS Bootloader (LOADER.SYS)
  5470. #
  5471. >98    string    Press\ a\ key\ to\ retry\0\r        
  5472. >>120    string    Cannot\ find\ file\ \0\r        
  5473. >>>139    string    Disk\ read\ error\0\r            
  5474. >>>>156    string    Loading\ ...\0                \b, DR-DOS (3.41) Bootloader
  5475. #DRBIOS.SYS
  5476. >>>>>44        ubyte&0xDF    >0            
  5477. >>>>>>44    string        x            \b %-.6s
  5478. >>>>>>>50    ubyte&0xDF    >0            
  5479. >>>>>>>>50    string        x             \b%-.2s
  5480. >>>>>>52    ubyte&0xDF    >0            
  5481. >>>>>>>52    string        x             \b.%-.3s
  5482. #
  5483. >70    string    IBMBIO\ \ COM                
  5484. >>472    string    Cannot\ load\ DOS!\             
  5485. >>>489    string    Any\ key\ to\ retry            \b, DR-DOS Bootloader
  5486. >>471    string    Cannot\ load\ DOS\             
  5487. >>487    string    press\ key\ to\ retry            \b, Open-DOS Bootloader
  5488. >444    string    KERNEL\ \ SYS                    
  5489. >>314    string    BOOT\ error!                \b, FREE-DOS Bootloader
  5490. >499    string    KERNEL\ \ SYS                
  5491. >>305    string    BOOT\ err!\0                \b, Free-DOS Bootloader
  5492. >449    string    KERNEL\ \ SYS                
  5493. >>319    string    BOOT\ error!                \b, FREE-DOS 0.5 Bootloader
  5494. >125    string    Loading\ FreeDOS...\r            
  5495. >>311    string    BOOT\ error!\r                \b, FREE-DOS bootloader
  5496. >>>441        ubyte&0xDF    >0            
  5497. >>>>441        string        x             \b %-.6s
  5498. >>>>>447    ubyte&0xDF    >0            
  5499. >>>>>>447    string        x             \b%-.1s
  5500. >>>>>>>448    ubyte&0xDF    >0            
  5501. >>>>>>>>448    string        x             \b%-.1s
  5502. >>>>449        ubyte&0xDF    >0            
  5503. >>>>>449    string        x             \b.%-.3s
  5504. >124    string    FreeDOS\0                
  5505. >>331    string    \ err\0                    \b, FREE-DOS BETa 0.9 Bootloader
  5506. # DOS names like KERNEL.SYS,KERNEL16.SYS,KERNEL32.SYS,METAKERN.SYS are 8 right space padded bytes+3 bytes
  5507. >>>497        ubyte&0xDF    >0            
  5508. >>>>497        string        x             \b %-.6s
  5509. >>>>>503    ubyte&0xDF    >0            
  5510. >>>>>>503    string        x             \b%-.1s
  5511. >>>>>>>504    ubyte&0xDF    >0            
  5512. >>>>>>>>504    string        x             \b%-.1s
  5513. >>>>505        ubyte&0xDF    >0            
  5514. >>>>>505    string        x             \b.%-.3s
  5515. >>333    string    \ err\0                    \b, FREE-DOS BEta 0.9 Bootloader
  5516. >>>497        ubyte&0xDF    >0            
  5517. >>>>497        string        x             \b %-.6s
  5518. >>>>>503    ubyte&0xDF    >0            
  5519. >>>>>>503    string        x             \b%-.1s
  5520. >>>>>>>504    ubyte&0xDF    >0            
  5521. >>>>>>>>504    string        x             \b%-.1s
  5522. >>>>505        ubyte&0xDF    >0            
  5523. >>>>>505    string        x             \b.%-.3s
  5524. >>334    string    \ err\0                    \b, FREE-DOS Beta 0.9 Bootloader
  5525. >>>497        ubyte&0xDF    >0            
  5526. >>>>497        string        x             \b %-.6s
  5527. >>>>>503    ubyte&0xDF    >0            
  5528. >>>>>>503    string        x             \b%-.1s
  5529. >>>>>>>504    ubyte&0xDF    >0            
  5530. >>>>>>>>504    string        x             \b%-.1s
  5531. >>>>505        ubyte&0xDF    >0            
  5532. >>>>>505    string        x             \b.%-.3s
  5533. >336    string    Error!\                 
  5534. >>343    string    Hit\ a\ key\ to\ reboot.        \b, FREE-DOS Beta 0.9sr1 Bootloader
  5535. >>>497        ubyte&0xDF    >0            
  5536. >>>>497        string        x             \b %-.6s
  5537. >>>>>503    ubyte&0xDF    >0            
  5538. >>>>>>503    string        x             \b%-.1s
  5539. >>>>>>>504    ubyte&0xDF    >0            
  5540. >>>>>>>>504    string        x             \b%-.1s
  5541. >>>>505        ubyte&0xDF    >0            
  5542. >>>>>505    string        x             \b.%-.3s
  5543. # added by Joerg Jenderek
  5544. # http://www.visopsys.org/
  5545. # http://partitionlogic.org.uk/
  5546. # OEM-ID=Visopsys
  5547. >478        ulelong    0                    
  5548. >>(1.b+326)    string    I/O\ Error\ reading\             
  5549. >>>(1.b+344)    string    Visopsys\ loader\r            
  5550. >>>>(1.b+361)    string    Press\ any\ key\ to\ continue.\r    \b, Visopsys loader
  5551. # http://alexfru.chat.ru/epm.html#bootprog
  5552. >494    ubyte    >0x4D                    
  5553. >>495    string    >E                    
  5554. >>>495    string    <S                    
  5555. #OEM-ID is not reliable
  5556. >>>>3    string    BootProg                
  5557. # It just looks for a program file name at the root directory
  5558. # and loads corresponding file with following execution.
  5559. # DOS names like STARTUP.BIN,STARTUPC.COM,STARTUPE.EXE are 8 right space padded bytes+3 bytes
  5560. >>>>499            ubyte&0xDF    >0        \b, COM/EXE Bootloader
  5561. >>>>>499        string        x         \b %-.1s
  5562. >>>>>>500        ubyte&0xDF    >0        
  5563. >>>>>>>500        string        x         \b%-.1s
  5564. >>>>>>>>501        ubyte&0xDF    >0        
  5565. >>>>>>>>>501        string        x         \b%-.1s
  5566. >>>>>>>>>>502        ubyte&0xDF    >0        
  5567. >>>>>>>>>>>502        string        x         \b%-.1s
  5568. >>>>>>>>>>>>503        ubyte&0xDF    >0        
  5569. >>>>>>>>>>>>>503    string        x         \b%-.1s
  5570. >>>>>>>>>>>>>>504    ubyte&0xDF    >0        
  5571. >>>>>>>>>>>>>>>504    string        x         \b%-.1s
  5572. >>>>>>>>>>>>>>>>505    ubyte&0xDF    >0        
  5573. >>>>>>>>>>>>>>>>>505    string        x         \b%-.1s
  5574. >>>>>>>>>>>>>>>>>>506    ubyte&0xDF    >0        
  5575. >>>>>>>>>>>>>>>>>>>506    string        x         \b%-.1s
  5576. #name extension
  5577. >>>>>507        ubyte&0xDF    >0        \b.
  5578. >>>>>>507        string        x         \b%-.1s
  5579. >>>>>>>508        ubyte&0xDF    >0        
  5580. >>>>>>>>508        string        x         \b%-.1s
  5581. >>>>>>>>>509        ubyte&0xDF    >0        
  5582. >>>>>>>>>>509        string        x         \b%-.1s
  5583. #If the boot sector fails to read any other sector,
  5584. #it prints a very short message ("RE") to the screen and hangs the computer.
  5585. #If the boot sector fails to find needed program in the root directory,
  5586. #it also hangs with another message ("NF").
  5587. >>>>>492        string        RENF        \b, FAT (12 bit)
  5588. >>>>>495        string        RENF        \b, FAT (16 bit)
  5589. # http://alexfru.chat.ru/epm.html#bootprog
  5590. >494    ubyte    >0x4D                    
  5591. >>495    string    >E                    
  5592. >>>495    string    <S                    
  5593. #OEM-ID is not reliable
  5594. >>>>3    string    BootProg                
  5595. # It just looks for a program file name at the root directory
  5596. # and loads corresponding file with following execution.
  5597. # DOS names like STARTUP.BIN,STARTUPC.COM,STARTUPE.EXE are 8 right space padded bytes+3 bytes
  5598. >>>>499            ubyte&0xDF    >0        \b, COM/EXE Bootloader
  5599. >>>>>499        string        x         \b %-.1s
  5600. >>>>>>500        ubyte&0xDF    >0        
  5601. >>>>>>>500        string        x         \b%-.1s
  5602. >>>>>>>>501        ubyte&0xDF    >0        
  5603. >>>>>>>>>501        string        x         \b%-.1s
  5604. >>>>>>>>>>502        ubyte&0xDF    >0        
  5605. >>>>>>>>>>>502        string        x         \b%-.1s
  5606. >>>>>>>>>>>>503        ubyte&0xDF    >0        
  5607. >>>>>>>>>>>>>503    string        x         \b%-.1s
  5608. >>>>>>>>>>>>>>504    ubyte&0xDF    >0        
  5609. >>>>>>>>>>>>>>>504    string        x         \b%-.1s
  5610. >>>>>>>>>>>>>>>>505    ubyte&0xDF    >0        
  5611. >>>>>>>>>>>>>>>>>505    string        x         \b%-.1s
  5612. >>>>>>>>>>>>>>>>>>506    ubyte&0xDF    >0        
  5613. >>>>>>>>>>>>>>>>>>>506    string        x         \b%-.1s
  5614. #name extension
  5615. >>>>>507        ubyte&0xDF    >0        \b.
  5616. >>>>>>507        string        x         \b%-.1s
  5617. >>>>>>>508        ubyte&0xDF    >0        
  5618. >>>>>>>>508        string        x         \b%-.1s
  5619. >>>>>>>>>509        ubyte&0xDF    >0        
  5620. >>>>>>>>>>509        string        x         \b%-.1s
  5621. #If the boot sector fails to read any other sector,
  5622. #it prints a very short message ("RE") to the screen and hangs the computer.
  5623. #If the boot sector fails to find needed program in the root directory,
  5624. #it also hangs with another message ("NF").
  5625. >>>>>492        string        RENF        \b, FAT (12 bit)
  5626. >>>>>495        string        RENF        \b, FAT (16 bit)
  5627. # added by Joerg Jenderek
  5628. # http://syslinux.zytor.com/iso.php
  5629. 0    ulelong    0x7c40eafa        isolinux Loader
  5630. # http://syslinux.zytor.com/pxe.php
  5631. 0    ulelong    0x007c05ea        pxelinux Loader
  5632. 0    ulelong    0x60669c66        pxelinux Loader
  5633. # loader end
  5634. # updated by Joerg Jenderek at Sep 2007
  5635. >3    ubyte    0            
  5636. #no active flag
  5637. >>446    ubyte    0            
  5638. # partition 1 not empty
  5639. >>>450    ubyte    >0            
  5640. # partitions 3,4 empty
  5641. >>>>482        ubyte    0            
  5642. >>>>>498    ubyte    0            
  5643. # partition 2 ID=0,5,15
  5644. >>>>>>466    ubyte    <0x10            
  5645. >>>>>>>466    ubyte    0x05            \b, extended partition table
  5646. >>>>>>>466    ubyte    0x0F            \b, extended partition table (LBA)
  5647. >>>>>>>466    ubyte    0x0            \b, extended partition table (last)    
  5648. # JuMP short     bootcodeoffset NOP assembler instructions will usually be EB xx 90
  5649. # http://mirror.href.com/thestarman/asm/2bytejumps.htmm#FWD
  5650. # older drives may use Near JuMP instruction E9 xx xx
  5651. >0        lelong&0x009000EB    0x009000EB 
  5652. >0        lelong&0x000000E9    0x000000E9 
  5653. # maximal short forward jump is 07fx
  5654. >1        ubyte            <0xff    \b, code offset 0x%x
  5655. # mtools-3.9.8/msdos.h
  5656. # usual values are marked with comments to get only informations of strange FAT systems
  5657. # valid sectorsize must be a power of 2 from 32 to 32768
  5658. >>11        uleshort&0x000f    x        
  5659. >>>11        uleshort    <32769        
  5660. >>>>11        uleshort    >31        
  5661. >>>>>3        string        >\0        \b, OEM-ID "%8.8s"
  5662. #http://mirror.href.com/thestarman/asm/debug/debug2.htm#IHC
  5663. >>>>>>8        string        IHC        \b cached by Windows 9M
  5664. >>>>>11        uleshort    >512        \b, Bytes/sector %u
  5665. #>>>>>11    uleshort    =512        \b, Bytes/sector %u=512 (usual)
  5666. >>>>>11        uleshort    <512        \b, Bytes/sector %u
  5667. >>>>>13        ubyte        >1        \b, sectors/cluster %u
  5668. #>>>>>13    ubyte        =1        \b, sectors/cluster %u (usual on Floppies)
  5669. >>>>>14        uleshort    >32        \b, reserved sectors %u
  5670. #>>>>>14    uleshort    =32        \b, reserved sectors %u (usual Fat32)
  5671. #>>>>>14    uleshort    >1        \b, reserved sectors %u
  5672. #>>>>>14    uleshort    =1        \b, reserved sectors %u (usual FAT12,FAT16)
  5673. >>>>>14        uleshort    <1        \b, reserved sectors %u
  5674. >>>>>16        ubyte        >2        \b, FATs %u
  5675. #>>>>>16    ubyte        =2        \b, FATs %u (usual)
  5676. >>>>>16        ubyte        =1        \b, FAT  %u
  5677. >>>>>16        ubyte        >0
  5678. >>>>>17        uleshort    >0        \b, root entries %u
  5679. #>>>>>17    uleshort    =0        \b, root entries %u=0 (usual Fat32)
  5680. >>>>>19        uleshort    >0        \b, sectors %u (volumes <=32 MB) 
  5681. #>>>>>19    uleshort    =0        \b, sectors %u=0 (usual Fat32)
  5682. >>>>>21        ubyte        >0xF0        \b, Media descriptor 0x%x
  5683. #>>>>>21    ubyte        =0xF0        \b, Media descriptor 0x%x (usual floppy)
  5684. >>>>>21        ubyte        <0xF0        \b, Media descriptor 0x%x
  5685. >>>>>22        uleshort    >0        \b, sectors/FAT %u
  5686. #>>>>>22    uleshort    =0        \b, sectors/FAT %u=0 (usual Fat32)
  5687. >>>>>26        ubyte        >2        \b, heads %u
  5688. #>>>>>26    ubyte        =2        \b, heads %u (usual floppy)
  5689. >>>>>26        ubyte        =1        \b, heads %u
  5690. #skip for Digital Research DOS (version 3.41) 1440 kB Bootdisk
  5691. >>>>>38        ubyte        !0x70        
  5692. >>>>>>28    ulelong        >0        \b, hidden sectors %u
  5693. #>>>>>>28    ulelong        =0        \b, hidden sectors %u (usual floppy)
  5694. >>>>>>32    ulelong        >0        \b, sectors %u (volumes > 32 MB) 
  5695. #>>>>>>32    ulelong        =0        \b, sectors %u (volumes > 32 MB)
  5696. # FAT<32 specific 
  5697. >>>>>82        string        !FAT32
  5698. #>>>>>>36    ubyte        0x80        \b, physical drive 0x%x=0x80 (usual harddisk)
  5699. #>>>>>>36    ubyte        0        \b, physical drive 0x%x=0 (usual floppy)
  5700. >>>>>>36    ubyte        !0x80        
  5701. >>>>>>>36    ubyte        !0        \b, physical drive 0x%x
  5702. >>>>>>37    ubyte        >0        \b, reserved 0x%x
  5703. #>>>>>>37    ubyte        =0        \b, reserved 0x%x
  5704. >>>>>>38    ubyte        >0x29        \b, dos < 4.0 BootSector (0x%x)
  5705. >>>>>>38    ubyte        <0x29        \b, dos < 4.0 BootSector (0x%x)
  5706. >>>>>>38    ubyte        =0x29
  5707. >>>>>>>39    ulelong        x        \b, serial number 0x%x
  5708. >>>>>>>43    string        <NO\ NAME    \b, label: "%11.11s"
  5709. >>>>>>>43    string        >NO\ NAME    \b, label: "%11.11s"
  5710. >>>>>>>43    string        =NO\ NAME    \b, unlabeled
  5711. >>>>>>54    string        FAT        \b, FAT
  5712. >>>>>>>54    string        FAT12        \b (12 bit)
  5713. >>>>>>>54    string        FAT16        \b (16 bit)
  5714. # FAT32 specific
  5715. >>>>>82        string        FAT32        \b, FAT (32 bit)
  5716. >>>>>>36    ulelong        x        \b, sectors/FAT %u
  5717. >>>>>>40    uleshort    >0        \b, extension flags %u
  5718. #>>>>>>40    uleshort    =0        \b, extension flags %u
  5719. >>>>>>42    uleshort    >0        \b, fsVersion %u
  5720. #>>>>>>42    uleshort    =0        \b, fsVersion %u (usual)
  5721. >>>>>>44    ulelong        >2        \b, rootdir cluster %u
  5722. #>>>>>>44    ulelong        =2        \b, rootdir cluster %u
  5723. #>>>>>>44    ulelong        =1        \b, rootdir cluster %u
  5724. >>>>>>48    uleshort    >1        \b, infoSector %u
  5725. #>>>>>>48    uleshort    =1        \b, infoSector %u (usual)
  5726. >>>>>>48    uleshort    <1        \b, infoSector %u
  5727. >>>>>>50    uleshort    >6        \b, Backup boot sector %u
  5728. #>>>>>>50    uleshort    =6        \b, Backup boot sector %u (usual) 
  5729. >>>>>>50    uleshort    <6        \b, Backup boot sector %u
  5730. >>>>>>54    ulelong        >0        \b, reserved1 0x%x
  5731. >>>>>>58    ulelong        >0        \b, reserved2 0x%x
  5732. >>>>>>62    ulelong        >0        \b, reserved3 0x%x
  5733. # same structure as FAT1X 
  5734. >>>>>>64    ubyte        >0x80        \b, physical drive 0x%x
  5735. #>>>>>>64    ubyte        =0x80        \b, physical drive 0x%x=80 (usual harddisk)
  5736. >>>>>>64    ubyte&0x7F    >0        \b, physical drive 0x%x
  5737. #>>>>>>64    ubyte        =0        \b, physical drive 0x%x=0 (usual floppy)
  5738. >>>>>>65    ubyte        >0        \b, reserved 0x%x
  5739. >>>>>>66    ubyte        >0x29        \b, dos < 4.0 BootSector (0x%x)
  5740. >>>>>>66    ubyte        <0x29        \b, dos < 4.0 BootSector (0x%x)
  5741. >>>>>>66    ubyte        =0x29
  5742. >>>>>>>67    ulelong        x        \b, serial number 0x%x
  5743. >>>>>>>71    string        <NO\ NAME    \b, label: "%11.11s"
  5744. >>>>>>71    string        >NO\ NAME    \b, label: "%11.11s"
  5745. >>>>>>71    string        =NO\ NAME    \b, unlabeled
  5746. ### FATs end
  5747. >0x200    lelong    0x82564557        \b, BSD disklabel
  5748. # FATX 
  5749. 0        string        FATX        FATX filesystem data
  5750.  
  5751.  
  5752. # Minix filesystems - Juan Cespedes <cespedes@debian.org>
  5753. 0x410    leshort        0x137f        Minix filesystem
  5754. 0x410    beshort        0x137f        Minix filesystem (big endian)
  5755. >0x402    beshort        !0        \b, %d zones
  5756. >0x1e    string        minix        \b, bootable
  5757. 0x410    leshort        0x138f        Minix filesystem, 30 char names
  5758. 0x410    leshort        0x2468        Minix filesystem, version 2
  5759. 0x410    leshort        0x2478        Minix filesystem, version 2, 30 char names
  5760.  
  5761. # romfs filesystems - Juan Cespedes <cespedes@debian.org>
  5762. 0    string        -rom1fs-\0    romfs filesystem, version 1
  5763. >8    belong    x            %d bytes,
  5764. >16    string    x            named %s.
  5765.  
  5766. # netboot image - Juan Cespedes <cespedes@debian.org>
  5767. 0    lelong        0x1b031336L    Netboot image,
  5768. >4    lelong&0xFFFFFF00    0
  5769. >>4    lelong&0x100    0x000        mode 2
  5770. >>4    lelong&0x100    0x100        mode 3
  5771. >4    lelong&0xFFFFFF00    !0    unknown mode
  5772.  
  5773. 0x18b    string    OS/2    OS/2 Boot Manager
  5774.  
  5775. # added by Joerg Jenderek
  5776. # In the second sector (+0x200) are variables according to grub-0.97/stage2/asm.S or
  5777. # grub-1.94/kern/i386/pc/startup.S
  5778. # http://www.gnu.org/software/grub/manual/grub.html#Embedded-data
  5779. # usual values are marked with comments to get only informations of strange GRUB loaders
  5780. 0x200    uleshort        0x70EA        
  5781. # found only version 3.{1,2}
  5782. >0x206        ubeshort    >0x0300        
  5783. # GRUB version (0.5.)95,0.93,0.94,0.96,0.97 > "00"
  5784. >>0x212     ubyte        >0x29        
  5785. >>>0x213     ubyte        >0x29        
  5786. # not iso9660_stage1_5
  5787. #>>>0    ulelong&0x00BE5652    0x00BE5652    
  5788. >>>>0x213     ubyte        >0x29        GRand Unified Bootloader
  5789. # config_file for stage1_5 is 0xffffffff + default "/boot/grub/stage2"
  5790. >>>>0x217     ubyte        0xFF        stage1_5
  5791. >>>>0x217     ubyte        <0xFF        stage2
  5792. >>>>0x206    ubyte        x        \b version %u
  5793. >>>>0x207    ubyte        x        \b.%u
  5794. # module_size for 1.94
  5795. >>>>0x208    ulelong        <0xffffff    \b, installed partition %u
  5796. #>>>>0x208    ulelong        =0xffffff    \b, %u (default)
  5797. >>>>0x208    ulelong        >0xffffff    \b, installed partition %u
  5798. # GRUB 0.5.95 unofficial
  5799. >>>>0x20C    ulelong&0x2E300000 0x2E300000    
  5800. # 0=stage2    1=ffs    2=e2fs    3=fat    4=minix    5=reiserfs
  5801. >>>>>0x20C    ubyte        x        \b, identifier 0x%x
  5802. #>>>>>0x20D    ubyte        =0        \b, LBA flag 0x%x (default)
  5803. >>>>>0x20D    ubyte        >0        \b, LBA flag 0x%x
  5804. # GRUB version as string
  5805. >>>>>0x20E     string        >\0        \b, GRUB version %-s
  5806. # for stage1_5 is 0xffffffff + config_file "/boot/grub/stage2" default
  5807. >>>>>>0x215     ulong        0xffffffff    
  5808. >>>>>>>0x219     string        >\0        \b, configuration file %-s
  5809. >>>>>>0x215     ulong        !0xffffffff    
  5810. >>>>>>>0x215     string        >\0        \b, configuration file %-s
  5811. # newer GRUB versions
  5812. >>>>0x20C    ulelong&0x2E300000 !0x2E300000    
  5813. ##>>>>>0x20C    ulelong        =0        \b, saved entry %d (usual)
  5814. >>>>>0x20C    ulelong        >0        \b, saved entry %d
  5815. # for 1.94 contains kernel image size
  5816. # for 0.93,0.94,0.96,0.97
  5817. # 0=stage2    1=ffs    2=e2fs    3=fat    4=minix    5=reiserfs    6=vstafs    7=jfs    8=xfs    9=iso9660    a=ufs2    
  5818. >>>>>0x210    ubyte        x        \b, identifier 0x%x
  5819. # The flag for LBA forcing is in most cases 0
  5820. #>>>>>0x211    ubyte        =0        \b, LBA flag 0x%x (default)
  5821. >>>>>0x211    ubyte        >0        \b, LBA flag 0x%x
  5822. # GRUB version as string
  5823. >>>>>0x212     string        >\0        \b, GRUB version %-s
  5824. # for stage1_5 is 0xffffffff + config_file "/boot/grub/stage2" default
  5825. >>>>>0x217     ulong        0xffffffff    
  5826. >>>>>>0x21b     string        >\0        \b, configuration file %-s
  5827. >>>>>0x217     ulong        !0xffffffff    
  5828. >>>>>>0x217     string        >\0        \b, configuration file %-s
  5829.  
  5830. 9564    lelong        0x00011954    Unix Fast File system [v1] (little-endian),
  5831. >8404    string        x        last mounted on %s,
  5832. #>9504    ledate        x        last checked at %s,
  5833. >8224    ledate        x        last written at %s,
  5834. >8401    byte        x        clean flag %d,
  5835. >8228    lelong        x        number of blocks %d,
  5836. >8232    lelong        x        number of data blocks %d,
  5837. >8236    lelong        x        number of cylinder groups %d,
  5838. >8240    lelong        x        block size %d,
  5839. >8244    lelong        x        fragment size %d,
  5840. >8252    lelong        x        minimum percentage of free blocks %d,
  5841. >8256    lelong        x        rotational delay %dms,
  5842. >8260    lelong        x        disk rotational speed %drps,
  5843. >8320    lelong        0        TIME optimization
  5844. >8320    lelong        1        SPACE optimization
  5845.  
  5846. 42332    lelong        0x19540119    Unix Fast File system [v2] (little-endian)
  5847. >&-1164    string        x        last mounted on %s,
  5848. >&-696    string        >\0        volume name %s,
  5849. >&-304    leqldate    x        last written at %s,
  5850. >&-1167    byte        x        clean flag %d,
  5851. >&-1168    byte        x        readonly flag %d,
  5852. >&-296    lequad        x        number of blocks %lld,
  5853. >&-288    lequad        x        number of data blocks %lld,
  5854. >&-1332    lelong        x        number of cylinder groups %d,
  5855. >&-1328    lelong        x        block size %d,
  5856. >&-1324    lelong        x        fragment size %d,
  5857. >&-180    lelong        x        average file size %d,
  5858. >&-176    lelong        x        average number of files in dir %d,
  5859. >&-272    lequad        x        pending blocks to free %lld,
  5860. >&-264    lelong        x        pending inodes to free %ld,
  5861. >&-664    lequad        x        system-wide uuid %0llx,
  5862. >&-1316    lelong        x        minimum percentage of free blocks %d,
  5863. >&-1248    lelong        0        TIME optimization
  5864. >&-1248    lelong        1        SPACE optimization
  5865.  
  5866. 66908    lelong        0x19540119    Unix Fast File system [v2] (little-endian)
  5867. >&-1164    string        x        last mounted on %s,
  5868. >&-696    string        >\0        volume name %s,
  5869. >&-304    leqldate    x        last written at %s,
  5870. >&-1167    byte        x        clean flag %d,
  5871. >&-1168    byte        x        readonly flag %d,
  5872. >&-296    lequad        x        number of blocks %lld,
  5873. >&-288    lequad        x        number of data blocks %lld,
  5874. >&-1332    lelong        x        number of cylinder groups %d,
  5875. >&-1328    lelong        x        block size %d,
  5876. >&-1324    lelong        x        fragment size %d,
  5877. >&-180    lelong        x        average file size %d,
  5878. >&-176    lelong        x        average number of files in dir %d,
  5879. >&-272    lequad        x        pending blocks to free %lld,
  5880. >&-264    lelong        x        pending inodes to free %ld,
  5881. >&-664    lequad        x        system-wide uuid %0llx,
  5882. >&-1316    lelong        x        minimum percentage of free blocks %d,
  5883. >&-1248    lelong        0        TIME optimization
  5884. >&-1248    lelong        1        SPACE optimization
  5885.  
  5886. 9564    belong        0x00011954    Unix Fast File system [v1] (big-endian),
  5887. >7168   belong        0x4c41424c    Apple UFS Volume
  5888. >>7186  string        x        named %s,
  5889. >>7176  belong        x        volume label version %d,
  5890. >>7180  bedate        x        created on %s,
  5891. >8404    string        x        last mounted on %s,
  5892. #>9504    bedate        x        last checked at %s,
  5893. >8224    bedate        x        last written at %s,
  5894. >8401    byte        x        clean flag %d,
  5895. >8228    belong        x        number of blocks %d,
  5896. >8232    belong        x        number of data blocks %d,
  5897. >8236    belong        x        number of cylinder groups %d,
  5898. >8240    belong        x        block size %d,
  5899. >8244    belong        x        fragment size %d,
  5900. >8252    belong        x        minimum percentage of free blocks %d,
  5901. >8256    belong        x        rotational delay %dms,
  5902. >8260    belong        x        disk rotational speed %drps,
  5903. >8320    belong        0        TIME optimization
  5904. >8320    belong        1        SPACE optimization
  5905.  
  5906. 42332    belong        0x19540119    Unix Fast File system [v2] (big-endian)
  5907. >&-1164    string        x        last mounted on %s,
  5908. >&-696    string        >\0        volume name %s,
  5909. >&-304    beqldate    x        last written at %s,
  5910. >&-1167    byte        x        clean flag %d,
  5911. >&-1168    byte        x        readonly flag %d,
  5912. >&-296    bequad        x        number of blocks %lld,
  5913. >&-288    bequad        x        number of data blocks %lld,
  5914. >&-1332    belong        x        number of cylinder groups %d,
  5915. >&-1328    belong        x        block size %d,
  5916. >&-1324    belong        x        fragment size %d,
  5917. >&-180    belong        x        average file size %d,
  5918. >&-176    belong        x        average number of files in dir %d,
  5919. >&-272    bequad        x        pending blocks to free %lld,
  5920. >&-264    belong        x        pending inodes to free %ld,
  5921. >&-664    bequad        x        system-wide uuid %0llx,
  5922. >&-1316    belong        x        minimum percentage of free blocks %d,
  5923. >&-1248    belong        0        TIME optimization
  5924. >&-1248    belong        1        SPACE optimization
  5925.  
  5926. 66908    belong        0x19540119    Unix Fast File system [v2] (big-endian)
  5927. >&-1164    string        x        last mounted on %s,
  5928. >&-696    string        >\0        volume name %s,
  5929. >&-304    beqldate    x        last written at %s,
  5930. >&-1167    byte        x        clean flag %d,
  5931. >&-1168    byte        x        readonly flag %d,
  5932. >&-296    bequad        x        number of blocks %lld,
  5933. >&-288    bequad        x        number of data blocks %lld,
  5934. >&-1332    belong        x        number of cylinder groups %d,
  5935. >&-1328    belong        x        block size %d,
  5936. >&-1324    belong        x        fragment size %d,
  5937. >&-180    belong        x        average file size %d,
  5938. >&-176    belong        x        average number of files in dir %d,
  5939. >&-272    bequad        x        pending blocks to free %lld,
  5940. >&-264    belong        x        pending inodes to free %ld,
  5941. >&-664    bequad        x        system-wide uuid %0llx,
  5942. >&-1316    belong        x        minimum percentage of free blocks %d,
  5943. >&-1248    belong        0        TIME optimization
  5944. >&-1248    belong        1        SPACE optimization
  5945.  
  5946. # ext2/ext3 filesystems - Andreas Dilger <adilger@dilger.ca>
  5947. # ext4 filesystem - Eric Sandeen <sandeen@sandeen.net>
  5948. 0x438   leshort         0xEF53          Linux
  5949. >0x44c  lelong          x               rev %d
  5950. >0x43e  leshort         x               \b.%d
  5951. # No journal?  ext2
  5952. >0x45c  lelong          ^0x0000004      ext2 filesystem data
  5953. >>0x43a leshort         ^0x0000001      (mounted or unclean)
  5954. # Has a journal?  ext3 or ext4
  5955. >0x45c  lelong          &0x0000004
  5956. #  and small INCOMPAT?
  5957. >>0x460 lelong          <0x0000040
  5958. #   and small RO_COMPAT?
  5959. >>>0x464 lelong         <0x0000008      ext3 filesystem data
  5960. #   else large RO_COMPAT?
  5961. >>>0x464 lelong         >0x0000007      ext4 filesystem data
  5962. #  else large INCOMPAT?
  5963. >>0x460 lelong          >0x000003f      ext4 filesystem data
  5964. # General flags for any ext* fs
  5965. >0x460  lelong          &0x0000004      (needs journal recovery)
  5966. >0x43a  leshort         &0x0000002      (errors)
  5967. # INCOMPAT flags
  5968. >0x460  lelong          &0x0000001      (compressed)
  5969. #>0x460 lelong          &0x0000002      (filetype)
  5970. #>0x460 lelong          &0x0000010      (meta bg)
  5971. >0x460  lelong          &0x0000040      (extents)
  5972. >0x460  lelong          &0x0000080      (64bit)
  5973. #>0x460 lelong          &0x0000100      (mmp)
  5974. #>0x460 lelong          &0x0000200      (flex bg)
  5975. # RO_INCOMPAT flags
  5976. #>0x464 lelong          &0x0000001      (sparse super)
  5977. >0x464  lelong          &0x0000002      (large files)
  5978. >0x464  lelong          &0x0000008      (huge files)
  5979. #>0x464 lelong          &0x0000010      (gdt checksum)
  5980. #>0x464 lelong          &0x0000020      (many subdirs)
  5981. #>0x463 lelong          &0x0000040      (extra isize)
  5982.  
  5983. # SGI disk labels - Nathan Scott <nathans@debian.org>
  5984. 0    belong        0x0BE5A941    SGI disk label (volume header)
  5985.  
  5986. # SGI XFS filesystem - Nathan Scott <nathans@debian.org>
  5987. 0    belong        0x58465342    SGI XFS filesystem data
  5988. >0x4    belong        x        (blksz %d,
  5989. >0x68    beshort        x        inosz %d,
  5990. >0x64    beshort        ^0x2004        v1 dirs)
  5991. >0x64    beshort        &0x2004        v2 dirs)
  5992.  
  5993. ############################################################################
  5994. # Minix-ST kernel floppy
  5995. 0x800    belong        0x46fc2700    Atari-ST Minix kernel image
  5996. >19    string        \240\5\371\5\0\011\0\2\0    \b, 720k floppy
  5997. >19    string        \320\2\370\5\0\011\0\1\0    \b, 360k floppy
  5998.  
  5999. ############################################################################
  6000. # Hmmm, is this a better way of detecting _standard_ floppy images ?
  6001. 19    string        \320\2\360\3\0\011\0\1\0    DOS floppy 360k
  6002. >0x1FE    leshort        0xAA55        \b, x86 hard disk boot sector
  6003. 19    string        \240\5\371\3\0\011\0\2\0    DOS floppy 720k
  6004. >0x1FE    leshort        0xAA55        \b, x86 hard disk boot sector
  6005. 19    string        \100\013\360\011\0\022\0\2\0    DOS floppy 1440k
  6006. >0x1FE    leshort        0xAA55        \b, x86 hard disk boot sector
  6007.  
  6008. 19    string        \240\5\371\5\0\011\0\2\0    DOS floppy 720k, IBM
  6009. >0x1FE    leshort        0xAA55        \b, x86 hard disk boot sector
  6010. 19    string        \100\013\371\5\0\011\0\2\0    DOS floppy 1440k, mkdosfs
  6011. >0x1FE    leshort        0xAA55        \b, x86 hard disk boot sector
  6012.  
  6013. 19    string        \320\2\370\5\0\011\0\1\0    Atari-ST floppy 360k
  6014. 19    string        \240\5\371\5\0\011\0\2\0    Atari-ST floppy 720k
  6015.  
  6016. #  Valid media descriptor bytes for MS-DOS:
  6017. #
  6018. #     Byte   Capacity   Media Size and Type
  6019. #     -------------------------------------------------
  6020. #
  6021. #     F0     2.88 MB    3.5-inch, 2-sided, 36-sector
  6022. #     F0     1.44 MB    3.5-inch, 2-sided, 18-sector
  6023. #     F9     720K       3.5-inch, 2-sided, 9-sector
  6024. #     F9     1.2 MB     5.25-inch, 2-sided, 15-sector
  6025. #     FD     360K       5.25-inch, 2-sided, 9-sector
  6026. #     FF     320K       5.25-inch, 2-sided, 8-sector
  6027. #     FC     180K       5.25-inch, 1-sided, 9-sector
  6028. #     FE     160K       5.25-inch, 1-sided, 8-sector
  6029. #     FE     250K       8-inch, 1-sided, single-density
  6030. #     FD     500K       8-inch, 2-sided, single-density
  6031. #     FE     1.2 MB     8-inch, 2-sided, double-density
  6032. #     F8     -----      Fixed disk 
  6033. #
  6034. #     FC     xxxK       Apricot 70x1x9 boot disk.
  6035. #
  6036. # Originally a bitmap:
  6037. #  xxxxxxx0    Not two sided
  6038. #  xxxxxxx1    Double sided
  6039. #  xxxxxx0x    Not 8 SPT
  6040. #  xxxxxx1x    8 SPT
  6041. #  xxxxx0xx    Not Removable drive
  6042. #  xxxxx1xx    Removable drive
  6043. #  11111xxx    Must be one.
  6044. #
  6045. # But now it's rather random:
  6046. #  111111xx    Low density disk
  6047. #        00    SS, Not 8 SPT
  6048. #        01    DS, Not 8 SPT
  6049. #        10    SS, 8 SPT
  6050. #        11    DS, 8 SPT
  6051. #
  6052. #  11111001    Double density 3╜ floppy disk, high density 5╝
  6053. #  11110000    High density 3╜ floppy disk
  6054. #  11111000    Hard disk any format
  6055. #
  6056.  
  6057. # CDROM Filesystems
  6058. # Modified for UDF by gerardo.cacciari@gmail.com
  6059. 32769    string    CD001
  6060. !:mime    application/x-iso9660-image
  6061. >38913    string   !NSR0      ISO 9660 CD-ROM filesystem data
  6062. >38913    string    NSR0      UDF filesystem data
  6063. >>38917    string    1         (version 1.0)
  6064. >>38917    string    2         (version 1.5)
  6065. >>38917    string    3         (version 2.0)
  6066. >>38917    byte     >0x33      (unknown version, ID 0x%X)
  6067. >>38917    byte     <0x31      (unknown version, ID 0x%X)
  6068. # "application id" which appears to be used as a volume label
  6069. >32808    string    >\0       '%s'
  6070. >34816    string    \000CD001\001EL\ TORITO\ SPECIFICATION    (bootable)
  6071. 37633    string    CD001     ISO 9660 CD-ROM filesystem data (raw 2352 byte sectors)
  6072. !:mime    application/x-iso9660-image
  6073. 32776    string    CDROM     High Sierra CD-ROM filesystem data
  6074.  
  6075. # cramfs filesystem - russell@coker.com.au
  6076. 0       lelong    0x28cd3d45      Linux Compressed ROM File System data, little endian
  6077. >4      lelong  x size %lu
  6078. >8      lelong  &1 version #2
  6079. >8      lelong  &2 sorted_dirs
  6080. >8      lelong  &4 hole_support
  6081. >32     lelong  x CRC 0x%x,
  6082. >36     lelong  x edition %lu,
  6083. >40     lelong  x %lu blocks,
  6084. >44     lelong  x %lu files
  6085.  
  6086. 0       belong    0x28cd3d45      Linux Compressed ROM File System data, big endian
  6087. >4      belong  x size %lu
  6088. >8      belong  &1 version #2
  6089. >8      belong  &2 sorted_dirs
  6090. >8      belong  &4 hole_support
  6091. >32     belong  x CRC 0x%x,
  6092. >36     belong  x edition %lu,
  6093. >40     belong  x %lu blocks,
  6094. >44     belong  x %lu files
  6095.  
  6096. # reiserfs - russell@coker.com.au
  6097. 0x10034        string    ReIsErFs    ReiserFS V3.5
  6098. 0x10034        string    ReIsEr2Fs    ReiserFS V3.6
  6099. 0x10034        string    ReIsEr3Fs    ReiserFS V3.6.19
  6100. >0x1002c     leshort    x        block size %d
  6101. >0x10032    leshort    &2        (mounted or unclean)
  6102. >0x10000    lelong    x        num blocks %d
  6103. >0x10040    lelong    1        tea hash
  6104. >0x10040    lelong    2        yura hash
  6105. >0x10040    lelong    3        r5 hash
  6106.  
  6107. # JFFS - russell@coker.com.au
  6108. 0    lelong    0x34383931    Linux Journalled Flash File system, little endian
  6109. 0    belong    0x34383931    Linux Journalled Flash File system, big endian
  6110.  
  6111. # EST flat binary format (which isn't, but anyway)
  6112. # From: Mark Brown <broonie@sirena.org.uk>
  6113. 0    string    ESTFBINR    EST flat binary
  6114.  
  6115. # Aculab VoIP firmware
  6116. # From: Mark Brown <broonie@sirena.org.uk>
  6117. 0    string    VoIP\ Startup\ and    Aculab VoIP firmware
  6118. >35    string    x    format %s
  6119.  
  6120. # u-boot/PPCBoot image file
  6121. # From: Mark Brown <broonie@sirena.org.uk>
  6122. 0    belong    0x27051956    u-boot/PPCBoot image
  6123. >4    string  PPCBoot
  6124. >>12    string  x        version %s
  6125.  
  6126. # JFFS2 file system
  6127. 0    leshort    0x1984        Linux old jffs2 filesystem data little endian
  6128. 0    leshort    0x1985        Linux jffs2 filesystem data little endian
  6129.  
  6130. # Squashfs
  6131. 0    string    sqsh    Squashfs filesystem, big endian,
  6132. >28    beshort    x    version %d.
  6133. >30    beshort x    \b%d,
  6134. >28    beshort <3
  6135. >>8    belong    x    %d bytes,
  6136. >28    beshort >2
  6137. >>63    bequad x    %lld bytes,
  6138. #>>67    belong    x    %d bytes,
  6139. >4    belong    x    %d inodes,
  6140. >28    beshort <2
  6141. >>32    beshort    x    blocksize: %d bytes,
  6142. >28    beshort >1
  6143. >>51    belong    x    blocksize: %d bytes,
  6144. >39    bedate    x    created: %s
  6145. 0    string    hsqs    Squashfs filesystem, little endian,
  6146. >28    leshort    x    version %d.
  6147. >30    leshort    x    \b%d,
  6148. >28    leshort <3
  6149. >>8    lelong    x    %d bytes,
  6150. >28    leshort >2
  6151. >>63    lequad x    %lld bytes,
  6152. #>>63    lelong    x    %d bytes,
  6153. >4    lelong    x    %d inodes,
  6154. >28    leshort <2
  6155. >>32    leshort    x    blocksize: %d bytes,
  6156. >28    leshort >1
  6157. >>51    lelong    x    blocksize: %d bytes,
  6158. >39    ledate    x    created: %s
  6159.  
  6160. 0    string        td\000        floppy image data (TeleDisk)
  6161.  
  6162. # AFS Dump Magic
  6163. # From: Ty Sarna <tsarna@sarna.org> 
  6164. 0       string                  \x01\xb3\xa1\x13\x22    AFS Dump
  6165. >&0     belong                  x                       (v%d)
  6166. >>&0    byte                    0x76
  6167. >>>&0   belong                  x                       Vol %d,
  6168. >>>>&0  byte                    0x6e
  6169. >>>>>&0 string                  x                       %s
  6170. >>>>>>&1        byte            0x74
  6171. >>>>>>>&0       beshort         2
  6172. >>>>>>>>&4      bedate          x                       on: %s
  6173. >>>>>>>>&0      bedate          =0                      full dump
  6174. >>>>>>>>&0      bedate          !0                      incremental since: %s
  6175.  
  6176. #----------------------------------------------------------
  6177. # VMS backup savesets - gerardo.cacciari@gmail.com
  6178. #
  6179. 4            string  \x01\x00\x01\x00\x01\x00
  6180. >(0.s+16)    string  \x01\x01
  6181. >>&(&0.b+8)  byte    0x42       OpenVMS backup saveset data
  6182. >>>40        lelong  x          (block size %d,
  6183. >>>49        string  >\0        original name '%s',
  6184. >>>2         short   1024       VAX generated)
  6185. >>>2         short   2048       AXP generated)
  6186. >>>2         short   4096       I64 generated)
  6187.  
  6188. # Compaq/HP RILOE floppy image
  6189. # From: Dirk Jagdmann <doj@cubic.org>
  6190. 0    string    CPQRFBLO    Compaq/HP RILOE floppy image
  6191.  
  6192. #------------------------------------------------------------------------------
  6193. # Files-11 On-Disk Structure (OpenVMS file system) - gerardo.cacciari@gmail.com
  6194. # These bits come from LBN 1 (home block) of ODS-2 and ODS-5 volumes, which is
  6195. # mapped to VBN 2 of [000000]INDEXF.SYS;1
  6196. #
  6197. 1008    string          DECFILE11B      Files-11 On-Disk Structure
  6198. >525    byte            x               Level %d
  6199. >525    byte            x               (ODS-%d OpenVMS file system),
  6200. >984    string          x               volume label is '%-12.12s'
  6201.  
  6202. # From: Thomas Klausner <wiz@NetBSD.org>
  6203. # http://filext.com/file-extension/DAA
  6204. # describes the daa file format. The magic would be:
  6205. 0    string        DAA\x0\x0\x0\x0\x0    PowerISO Direct-Access-Archive
  6206.  
  6207. # From Albert Cahalan <acahalan@gmail.com>
  6208. # really le32 operation,destination,payloadsize (but quite predictable)
  6209. # 01 00 00 00 00 00 00 c0 00 02 00 00
  6210. 0    string        \1\0\0\0\0\0\0\300\0\2\0\0    Marvell Libertas firmware
  6211.  
  6212. # Type:    CROM filesystem
  6213. # From:    Werner Fink <werner@suse.de>
  6214. 0    string    CROMFS    CROMFS
  6215. >6    string    >\0    \b version %2.2s,
  6216. >8    ulequad    >0    \b block data at %lld,
  6217. >16    ulequad    >0    \b fblock table at %lld,
  6218. >24    ulequad    >0    \b inode table at %lld,
  6219. >32    ulequad    >0    \b root at %lld,
  6220. >40    ulelong    >0    \b fblock size = %ld,
  6221. >44    ulelong    >0    \b block size = %ld,
  6222. >48    ulequad    >0    \b bytes = %lld
  6223.  
  6224. #------------------------------------------------------------------------------
  6225. # flash:    file(1) magic for Macromedia Flash file format
  6226. #
  6227. # See
  6228. #
  6229. #    http://www.macromedia.com/software/flash/open/
  6230. #
  6231. 0    string        FWS        Macromedia Flash data,
  6232. >3    byte        x        version %d
  6233. !:mime    application/x-shockwave-flash
  6234. 0    string        CWS        Macromedia Flash data (compressed),
  6235. !:mime    application/x-shockwave-flash
  6236. >3    byte        x        version %d
  6237. # From: Cal Peake <cp@absolutedigital.net>
  6238. 0    string        FLV        Macromedia Flash Video
  6239. !:mime    video/x-flv
  6240.  
  6241. #
  6242. # From Dave Wilson
  6243. 0    string AGD4\xbe\xb8\xbb\xcb\x00    Macromedia Freehand 9 Document
  6244. #------------------------------------------------------------------------------
  6245. # fonts:  file(1) magic for font data
  6246. #
  6247. 0    search/1    FONT        ASCII vfont text
  6248. 0    short        0436        Berkeley vfont data
  6249. 0    short        017001        byte-swapped Berkeley vfont data
  6250.  
  6251. # PostScript fonts (must precede "printer" entries), quinlan@yggdrasil.com
  6252. 0    search/1    %!PS-AdobeFont-1.    PostScript Type 1 font text
  6253. >20    search/1    >\0            (%s)
  6254. 6    string        %!PS-AdobeFont-1.    PostScript Type 1 font program data
  6255.  
  6256. # X11 font files in SNF (Server Natural Format) format
  6257. 0    belong        00000004        X11 SNF font data, MSB first
  6258. 0    lelong        00000004        X11 SNF font data, LSB first
  6259.  
  6260. # X11 Bitmap Distribution Format, from Daniel Quinlan (quinlan@yggdrasil.com)
  6261. 0    search/1    STARTFONT\         X11 BDF font text
  6262.  
  6263. # X11 fonts, from Daniel Quinlan (quinlan@yggdrasil.com)
  6264. # PCF must come before SGI additions ("MIPSEL MIPS-II COFF" collides)
  6265. 0    string        \001fcp            X11 Portable Compiled Font data
  6266. >12    byte        0x02            \b, LSB first
  6267. >12    byte        0x0a            \b, MSB first
  6268. 0    string        D1.0\015        X11 Speedo font data
  6269.  
  6270. #------------------------------------------------------------------------------
  6271. # FIGlet fonts and controlfiles
  6272. # From figmagic supplied with Figlet version 2.2
  6273. # "David E. O'Brien" <obrien@FreeBSD.ORG>
  6274. 0    string        flf        FIGlet font
  6275. >3    string        >2a        version %-2.2s
  6276. 0    string        flc        FIGlet controlfile
  6277. >3    string        >2a        version %-2.2s
  6278.  
  6279. # libGrx graphics lib fonts, from Albert Cahalan (acahalan@cs.uml.edu)
  6280. # Used with djgpp (DOS Gnu C++), sometimes Linux or Turbo C++
  6281. 0    belong        0x14025919    libGrx font data,
  6282. >8    leshort        x        %dx
  6283. >10    leshort        x        \b%d
  6284. >40    string        x        %s
  6285. # Misc. DOS VGA fonts, from Albert Cahalan (acahalan@cs.uml.edu)
  6286. 0    belong        0xff464f4e    DOS code page font data collection
  6287. 7    belong        0x00454741    DOS code page font data
  6288. 7    belong        0x00564944    DOS code page font data (from Linux?)
  6289. 4098    string        DOSFONT        DOSFONT2 encrypted font data
  6290.  
  6291. # downloadable fonts for browser (prints type) anthon@mnt.org
  6292. 0    string        PFR1        PFR1 font
  6293. >102    string        >0        \b: %s
  6294.  
  6295. # True Type fonts
  6296. 0    string    \000\001\000\000\000    TrueType font data
  6297.  
  6298. 0    string        \007\001\001\000Copyright\ (c)\ 199    Adobe Multiple Master font
  6299. 0    string        \012\001\001\000Copyright\ (c)\ 199    Adobe Multiple Master font
  6300.  
  6301. # Opentype font data from Avi Bercovich
  6302. 0    string        OTTO        OpenType font data 
  6303.  
  6304. # G├╝rkan Seng├╝n <gurkan@linuks.mine.nu>, www.linuks.mine.nu 
  6305. 0    string        SplineFontDB:    Spline Font Database 
  6306. >14    string        x        version %s
  6307. # FORTRAN source
  6308. 0    string/c    c\         FORTRAN program
  6309. !:mime    text/x-fortran
  6310. #------------------------------------------------------------------------------
  6311. # frame:  file(1) magic for FrameMaker files
  6312. #
  6313. # This stuff came on a FrameMaker demo tape, most of which is
  6314. # copyright, but this file is "published" as witness the following:
  6315. #
  6316. # Note that this is the Framemaker Maker Interchange Format, not the
  6317. # Normal format which would be application/vnd.framemaker.
  6318. #
  6319. 0    string        \<MakerFile    FrameMaker document
  6320. !:mime    application/x-mif
  6321. >11    string        5.5         (5.5
  6322. >11    string        5.0         (5.0
  6323. >11    string        4.0         (4.0
  6324. >11    string        3.0         (3.0
  6325. >11    string        2.0         (2.0
  6326. >11    string        1.0         (1.0
  6327. >14    byte        x          %c)
  6328. 0    string        \<MIFFile    FrameMaker MIF (ASCII) file
  6329. !:mime    application/x-mif
  6330. >9    string        4.0         (4.0)
  6331. >9    string        3.0         (3.0)
  6332. >9    string        2.0         (2.0)
  6333. >9    string        1.0         (1.x)
  6334. 0    search/1    \<MakerDictionary    FrameMaker Dictionary text
  6335. !:mime    application/x-mif
  6336. >17    string        3.0         (3.0)
  6337. >17    string        2.0         (2.0)
  6338. >17    string        1.0         (1.x)
  6339. 0    string        \<MakerScreenFont    FrameMaker Font file
  6340. !:mime    application/x-mif
  6341. >17    string        1.01         (%s)
  6342. 0    string        \<MML        FrameMaker MML file
  6343. !:mime    application/x-mif
  6344. 0    string        \<BookFile    FrameMaker Book file
  6345. !:mime    application/x-mif
  6346. >10    string        3.0         (3.0
  6347. >10    string        2.0         (2.0
  6348. >10    string        1.0         (1.0
  6349. >13    byte        x          %c)
  6350. # XXX - this book entry should be verified, if you find one, uncomment this
  6351. #0    string        \<Book\     FrameMaker Book (ASCII) file
  6352. #!:mime    application/x-mif
  6353. #>6    string        3.0         (3.0)
  6354. #>6    string        2.0         (2.0)
  6355. #>6    string        1.0         (1.0)
  6356. 0    string        \<Maker    Intermediate Print File    FrameMaker IPL file
  6357. !:mime    application/x-mif
  6358.  
  6359. #------------------------------------------------------------------------------
  6360. # freebsd:  file(1) magic for FreeBSD objects
  6361. #
  6362. # All new-style FreeBSD magic numbers are in host byte order (i.e.,
  6363. # little-endian on x86).
  6364. #
  6365. # XXX - this comes from the file "freebsd" in a recent FreeBSD version of
  6366. # "file"; it, and the NetBSD stuff in "netbsd", appear to use different
  6367. # schemes for distinguishing between executable images, shared libraries,
  6368. # and object files.
  6369. #
  6370. # FreeBSD says:
  6371. #
  6372. #    Regardless of whether it's pure, demand-paged, or none of the
  6373. #    above:
  6374. #
  6375. #    if the entry point is < 4096, then it's a shared library if
  6376. #    the "has run-time loader information" bit is set, and is
  6377. #    position-independent if the "is position-independent" bit
  6378. #    is set;
  6379. #
  6380. #    if the entry point is >= 4096 (or >4095, same thing), then it's
  6381. #    an executable, and is dynamically-linked if the "has run-time
  6382. #    loader information" bit is set.
  6383. #
  6384. # On x86, NetBSD says:
  6385. #
  6386. #    If it's neither pure nor demand-paged:
  6387. #
  6388. #    if it has the "has run-time loader information" bit set, it's
  6389. #    a dynamically-linked executable;
  6390. #
  6391. #    if it doesn't have that bit set, then:
  6392. #
  6393. #        if it has the "is position-independent" bit set, it's
  6394. #        position-independent;
  6395. #
  6396. #        if the entry point is non-zero, it's an executable, otherwise
  6397. #        it's an object file.
  6398. #
  6399. #    If it's pure:
  6400. #
  6401. #    if it has the "has run-time loader information" bit set, it's
  6402. #    a dynamically-linked executable, otherwise it's just an
  6403. #    executable.
  6404. #
  6405. #    If it's demand-paged:
  6406. #
  6407. #    if it has the "has run-time loader information" bit set,
  6408. #    then:
  6409. #
  6410. #        if the entry point is < 4096, it's a shared library;
  6411. #
  6412. #        if the entry point is = 4096 or > 4096 (i.e., >= 4096),
  6413. #        it's a dynamically-linked executable);
  6414. #
  6415. #    if it doesn't have the "has run-time loader information" bit
  6416. #    set, then it's just an executable.
  6417. #
  6418. # (On non-x86, NetBSD does much the same thing, except that it uses
  6419. # 8192 on 68K - except for "68k4k", which is presumably "68K with 4K
  6420. # pages - SPARC, and MIPS, presumably because Sun-3's and Sun-4's
  6421. # had 8K pages; dunno about MIPS.)
  6422. #
  6423. # I suspect the two will differ only in perverse and uninteresting cases
  6424. # ("shared" libraries that aren't demand-paged and whose pages probably
  6425. # won't actually be shared, executables with entry points <4096).
  6426. #
  6427. # I leave it to those more familiar with FreeBSD and NetBSD to figure out
  6428. # what the right answer is (although using ">4095", FreeBSD-style, is
  6429. # probably better than separately checking for "=4096" and ">4096",
  6430. # NetBSD-style).  (The old "netbsd" file analyzed FreeBSD demand paged
  6431. # executables using the NetBSD technique.)
  6432. #
  6433. 0    lelong&0377777777    041400407    FreeBSD/i386
  6434. >20    lelong            <4096
  6435. >>3    byte&0xC0        &0x80        shared library
  6436. >>3    byte&0xC0        0x40        PIC object
  6437. >>3    byte&0xC0        0x00        object
  6438. >20    lelong            >4095
  6439. >>3    byte&0x80        0x80        dynamically linked executable
  6440. >>3    byte&0x80        0x00        executable
  6441. >16    lelong            >0        not stripped
  6442.  
  6443. 0    lelong&0377777777    041400410    FreeBSD/i386 pure
  6444. >20    lelong            <4096
  6445. >>3    byte&0xC0        &0x80        shared library
  6446. >>3    byte&0xC0        0x40        PIC object
  6447. >>3    byte&0xC0        0x00        object
  6448. >20    lelong            >4095
  6449. >>3    byte&0x80        0x80        dynamically linked executable
  6450. >>3    byte&0x80        0x00        executable
  6451. >16    lelong            >0        not stripped
  6452.  
  6453. 0    lelong&0377777777    041400413    FreeBSD/i386 demand paged
  6454. >20    lelong            <4096
  6455. >>3    byte&0xC0        &0x80        shared library
  6456. >>3    byte&0xC0        0x40        PIC object
  6457. >>3    byte&0xC0        0x00        object
  6458. >20    lelong            >4095
  6459. >>3    byte&0x80        0x80        dynamically linked executable
  6460. >>3    byte&0x80        0x00        executable
  6461. >16    lelong            >0        not stripped
  6462.  
  6463. 0    lelong&0377777777    041400314    FreeBSD/i386 compact demand paged
  6464. >20    lelong            <4096
  6465. >>3    byte&0xC0        &0x80        shared library
  6466. >>3    byte&0xC0        0x40        PIC object
  6467. >>3    byte&0xC0        0x00        object
  6468. >20    lelong            >4095
  6469. >>3    byte&0x80        0x80        dynamically linked executable
  6470. >>3    byte&0x80        0x00        executable
  6471. >16    lelong            >0        not stripped
  6472.  
  6473. # XXX gross hack to identify core files
  6474. # cores start with a struct tss; we take advantage of the following:
  6475. # byte 7:     highest byte of the kernel stack pointer, always 0xfe
  6476. #      8/9:   kernel (ring 0) ss value, always 0x0010
  6477. #      10 - 27: ring 1 and 2 ss/esp, unused, thus always 0
  6478. #      28:    low order byte of the current PTD entry, always 0 since the
  6479. #             PTD is page-aligned
  6480. #
  6481. 7    string    \357\020\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0    FreeBSD/i386 a.out core file
  6482. >1039    string    >\0    from '%s'
  6483.  
  6484. # /var/run/ld.so.hints
  6485. # What are you laughing about?
  6486. 0    lelong            011421044151    ld.so hints file (Little Endian
  6487. >4    lelong            >0        \b, version %d)
  6488. >4    belong            <=0        \b)
  6489. 0    belong            011421044151    ld.so hints file (Big Endian
  6490. >4    belong            >0        \b, version %d)
  6491. >4    belong            <=0        \b)
  6492.  
  6493. #
  6494. # Files generated by FreeBSD scrshot(1)/vidcontrol(1) utilities
  6495. #
  6496. 0    string    SCRSHOT_    scrshot(1) screenshot,
  6497. >8    byte    x        version %d,
  6498. >9    byte    2        %d bytes in header,
  6499. >>10    byte    x        %d chars wide by
  6500. >>11    byte    x        %d chars high
  6501.  
  6502. #------------------------------------------------------------------------------
  6503. # fsav:  file(1) magic for datafellows fsav virus definition files
  6504. # Anthon van der Neut (anthon@mnt.org)
  6505.  
  6506. # ftp://ftp.f-prot.com/pub/{macrdef2.zip,nomacro.def}
  6507. 0    beshort        0x1575        fsav macro virus signatures
  6508. >8    leshort        >0        (%d-
  6509. >11    byte        >0        \b%02d-
  6510. >10    byte        >0        \b%02d)
  6511. # ftp://ftp.f-prot.com/pub/sign.zip
  6512. #10    ubyte        <12
  6513. #>9    ubyte        <32
  6514. #>>8    ubyte        0x0a
  6515. #>>>12    ubyte        0x07
  6516. #>>>>11    uleshort    >0        fsav DOS/Windows virus signatures (%d-
  6517. #>>>>10    byte        0        \b01-
  6518. #>>>>10    byte        1        \b02-
  6519. #>>>>10    byte        2        \b03-
  6520. #>>>>10    byte        3        \b04-
  6521. #>>>>10    byte        4        \b05-
  6522. #>>>>10    byte        5        \b06-
  6523. #>>>>10    byte        6        \b07-
  6524. #>>>>10    byte        7        \b08-
  6525. #>>>>10    byte        8        \b09-
  6526. #>>>>10    byte        9        \b10-
  6527. #>>>>10    byte        10        \b11-
  6528. #>>>>10    byte        11        \b12-
  6529. #>>>>9    ubyte        >0        \b%02d)
  6530. # ftp://ftp.f-prot.com/pub/sign2.zip
  6531. #0    ubyte        0x62        
  6532. #>1    ubyte        0xF5        
  6533. #>>2    ubyte        0x1        
  6534. #>>>3    ubyte        0x1        
  6535. #>>>>4    ubyte        0x0e        
  6536. #>>>>>13        ubyte    >0        fsav virus signatures
  6537. #>>>>>>11    ubyte    x        size 0x%02x
  6538. #>>>>>>12    ubyte    x        \b%02x
  6539. #>>>>>>13    ubyte    x        \b%02x bytes
  6540.  
  6541. # Joerg Jenderek: joerg dot jenderek at web dot de
  6542. # http://www.clamav.net/doc/latest/html/node45.html
  6543. # .cvd files start with a 512 bytes colon separated header
  6544. # ClamAV-VDB:buildDate:version:signaturesNumbers:functionalityLevelRequired:MD5:Signature:builder:buildTime
  6545. # + gzipped tarball files
  6546. 0    string        ClamAV-VDB:    
  6547. >11    string        >\0        Clam AntiVirus database %-.23s
  6548. >>34    string        :        
  6549. >>>35        string        !:    \b, version 
  6550. >>>>35        string        x     \b%-.1s
  6551. >>>>>36        string         !:    
  6552. >>>>>>36    string        x     \b%-.1s
  6553. >>>>>>>37    string        !:    
  6554. >>>>>>>>37    string        x     \b%-.1s
  6555. >>>>>>>>>38    string        !:    
  6556. >>>>>>>>>>38    string        x     \b%-.1s
  6557. >>>>512    string        \037\213    \b, gzipped
  6558. >>>>769    string        ustar\0        \b, tarred
  6559. >512    string        \037\213    \b, gzipped
  6560. >769    string        ustar\0        \b, tarred
  6561.  
  6562. # Type: Grisoft AVG AntiVirus
  6563. # From: David Newgas <david@newgas.net>
  6564. 0    string    AVG7_ANTIVIRUS_VAULT_FILE    AVG 7 Antivirus vault file data
  6565. #------------------------------------------------------------------------------
  6566. # games:  file(1) for games
  6567.  
  6568. # Fabio Bonelli <fabiobonelli@libero.it>
  6569. # Quake II - III data files
  6570. 0       string  IDP2            Quake II 3D Model file,
  6571. >20     long    x               %lu skin(s),
  6572. >8      long    x               (%lu x
  6573. >12     long    x         %lu),
  6574. >40     long    x               %lu frame(s),
  6575. >16     long    x               Frame size %lu bytes,
  6576. >24     long      x               %lu vertices/frame,
  6577. >28     long    x                %lu texture coordinates,
  6578. >32     long    x               %lu triangles/frame
  6579.  
  6580. 0       string  IBSP            Quake
  6581. >4      long    0x26            II Map file (BSP)
  6582. >4      long    0x2E          III Map file (BSP)
  6583.  
  6584. 0       string  IDS2            Quake II SP2 sprite file
  6585.  
  6586. #---------------------------------------------------------------------------
  6587. # Doom and Quake
  6588. # submitted by Nicolas Patrois
  6589.  
  6590. 0       string  \xcb\x1dBoom\xe6\xff\x03\x01    Boom or linuxdoom demo
  6591. # some doom lmp files don't match, I've got one beginning with \x6d\x02\x01\x01
  6592.  
  6593. 24      string  LxD\ 203        Linuxdoom save
  6594. >0      string  x       , name=%s
  6595. >44     string  x       , world=%s
  6596.  
  6597. # Quake
  6598.  
  6599. 0       string  PACK    Quake I or II world or extension
  6600.  
  6601. #0       string  -1\x0a  Quake I demo
  6602. #>30     string  x        version %.4s
  6603. #>61     string  x        level %s       
  6604.  
  6605. #0       string  5\x0a   Quake I save
  6606.  
  6607. # The levels
  6608.  
  6609. # Quake 1
  6610.  
  6611. 0    string    5\x0aIntroduction             Quake I save: start Introduction
  6612. 0    string    5\x0athe_Slipgate_Complex     Quake I save: e1m1 The slipgate complex
  6613. 0    string    5\x0aCastle_of_the_Damned     Quake I save: e1m2 Castle of the damned
  6614. 0    string    5\x0athe_Necropolis           Quake I save: e1m3 The necropolis
  6615. 0    string    5\x0athe_Grisly_Grotto        Quake I save: e1m4 The grisly grotto
  6616. 0    string    5\x0aZiggurat_Vertigo         Quake I save: e1m8 Ziggurat vertigo (secret)
  6617. 0    string    5\x0aGloom_Keep               Quake I save: e1m5 Gloom keep
  6618. 0    string    5\x0aThe_Door_To_Chthon       Quake I save: e1m6 The door to Chthon
  6619. 0    string    5\x0aThe_House_of_Chthon      Quake I save: e1m7 The house of Chthon
  6620. 0    string    5\x0athe_Installation         Quake I save: e2m1 The installation
  6621. 0    string    5\x0athe_Ogre_Citadel         Quake I save: e2m2 The ogre citadel
  6622. 0    string    5\x0athe_Crypt_of_Decay       Quake I save: e2m3 The crypt of decay (dopefish lives!)
  6623. 0    string    5\x0aUnderearth               Quake I save: e2m7 Underearth (secret)
  6624. 0    string    5\x0athe_Ebon_Fortress        Quake I save: e2m4 The ebon fortress
  6625. 0    string    5\x0athe_Wizard's_Manse       Quake I save: e2m5 The wizard's manse
  6626. 0    string    5\x0athe_Dismal_Oubliette     Quake I save: e2m6 The dismal oubliette
  6627. 0    string    5\x0aTermination_Central      Quake I save: e3m1 Termination central
  6628. 0    string    5\x0aVaults_of_Zin            Quake I save: e3m2 Vaults of Zin
  6629. 0    string    5\x0athe_Tomb_of_Terror       Quake I save: e3m3 The tomb of terror
  6630. 0    string    5\x0aSatan's_Dark_Delight     Quake I save: e3m4 Satan's dark delight
  6631. 0    string    5\x0athe_Haunted_Halls        Quake I save: e3m7 The haunted halls (secret)
  6632. 0    string    5\x0aWind_Tunnels             Quake I save: e3m5 Wind tunnels
  6633. 0    string    5\x0aChambers_of_Torment      Quake I save: e3m6 Chambers of torment
  6634. 0    string    5\x0athe_Sewage_System        Quake I save: e4m1 The sewage system
  6635. 0    string    5\x0aThe_Tower_of_Despair     Quake I save: e4m2 The tower of despair
  6636. 0    string    5\x0aThe_Elder_God_Shrine     Quake I save: e4m3 The elder god shrine
  6637. 0    string    5\x0athe_Palace_of_Hate       Quake I save: e4m4 The palace of hate
  6638. 0    string    5\x0aHell's_Atrium            Quake I save: e4m5 Hell's atrium
  6639. 0    string    5\x0athe_Nameless_City        Quake I save: e4m8 The nameless city (secret)
  6640. 0    string    5\x0aThe_Pain_Maze            Quake I save: e4m6 The pain maze
  6641. 0    string    5\x0aAzure_Agony              Quake I save: e4m7 Azure agony
  6642. 0    string    5\x0aShub-Niggurath's_Pit     Quake I save: end Shub-Niggurath's pit
  6643.  
  6644. # Quake DeathMatch levels
  6645.  
  6646. 0    string    5\x0aPlace_of_Two_Deaths     Quake I save: dm1 Place of two deaths
  6647. 0    string    5\x0aClaustrophobopolis         Quake I save: dm2 Claustrophobopolis
  6648. 0    string    5\x0aThe_Abandoned_Base         Quake I save: dm3 The abandoned base
  6649. 0    string    5\x0aThe_Bad_Place         Quake I save: dm4 The bad place
  6650. 0    string    5\x0aThe_Cistern         Quake I save: dm5 The cistern
  6651. 0    string    5\x0aThe_Dark_Zone         Quake I save: dm6 The dark zone
  6652.  
  6653. # Scourge of Armagon
  6654.  
  6655. 0    string    5\x0aCommand_HQ               Quake I save: start Command HQ
  6656. 0    string    5\x0aThe_Pumping_Station      Quake I save: hip1m1 The pumping station
  6657. 0    string    5\x0aStorage_Facility         Quake I save: hip1m2 Storage facility
  6658. 0    string    5\x0aMilitary_Complex         Quake I save: hip1m5 Military complex (secret)
  6659. 0    string    5\x0athe_Lost_Mine            Quake I save: hip1m3 The lost mine
  6660. 0    string    5\x0aResearch_Facility        Quake I save: hip1m4 Research facility
  6661. 0    string    5\x0aAncient_Realms           Quake I save: hip2m1 Ancient realms
  6662. 0    string    5\x0aThe_Gremlin's_Domain     Quake I save: hip2m6 The gremlin's domain (secret)
  6663. 0    string    5\x0aThe_Black_Cathedral      Quake I save: hip2m2 The black cathedral
  6664. 0    string    5\x0aThe_Catacombs            Quake I save: hip2m3 The catacombs
  6665. 0    string    5\x0athe_Crypt__              Quake I save: hip2m4 The crypt
  6666. 0    string    5\x0aMortum's_Keep            Quake I save: hip2m5 Mortum's keep
  6667. 0    string    5\x0aTur_Torment              Quake I save: hip3m1 Tur torment
  6668. 0    string    5\x0aPandemonium              Quake I save: hip3m2 Pandemonium
  6669. 0    string    5\x0aLimbo                    Quake I save: hip3m3 Limbo
  6670. 0    string    5\x0athe_Edge_of_Oblivion     Quake I save: hipdm1 The edge of oblivion (secret)
  6671. 0    string    5\x0aThe_Gauntlet             Quake I save: hip3m4 The gauntlet
  6672. 0    string    5\x0aArmagon's_Lair           Quake I save: hipend Armagon's lair
  6673.  
  6674. # Malice
  6675.  
  6676. 0    string    5\x0aThe_Academy      Quake I save: start The academy
  6677. 0    string    5\x0aThe_Lab          Quake I save: d1 The lab
  6678. 0    string    5\x0aArea_33          Quake I save: d1b Area 33
  6679. 0    string    5\x0aSECRET_MISSIONS  Quake I save: d3b Secret missions
  6680. 0    string    5\x0aThe_Hospital     Quake I save: d10 The hospital (secret)
  6681. 0    string    5\x0aThe_Genetics_Lab Quake I save: d11 The genetics lab (secret)
  6682. 0    string    5\x0aBACK_2_MALICE    Quake I save: d4b Back to Malice
  6683. 0    string    5\x0aArea44           Quake I save: d1c Area 44
  6684. 0    string    5\x0aTakahiro_Towers  Quake I save: d2 Takahiro towers
  6685. 0    string    5\x0aA_Rat's_Life     Quake I save: d3 A rat's life
  6686. 0    string    5\x0aInto_The_Flood   Quake I save: d4 Into the flood
  6687. 0    string    5\x0aThe_Flood        Quake I save: d5 The flood
  6688. 0    string    5\x0aNuclear_Plant    Quake I save: d6 Nuclear plant
  6689. 0    string    5\x0aThe_Incinerator_Plant    Quake I save: d7 The incinerator plant
  6690. 0    string    5\x0aThe_Foundry              Quake I save: d7b The foundry
  6691. 0    string    5\x0aThe_Underwater_Base      Quake I save: d8 The underwater base
  6692. 0    string    5\x0aTakahiro_Base            Quake I save: d9 Takahiro base
  6693. 0    string    5\x0aTakahiro_Laboratories    Quake I save: d12 Takahiro laboratories
  6694. 0    string    5\x0aStayin'_Alive    Quake I save: d13 Stayin' alive
  6695. 0    string    5\x0aB.O.S.S._HQ      Quake I save: d14 B.O.S.S. HQ
  6696. 0    string    5\x0aSHOWDOWN!        Quake I save: d15 Showdown!
  6697.  
  6698. # Malice DeathMatch levels
  6699.  
  6700. 0    string    5\x0aThe_Seventh_Precinct     Quake I save: ddm1 The seventh precinct
  6701. 0    string    5\x0aSub_Station         Quake I save: ddm2 Sub station
  6702. 0    string    5\x0aCrazy_Eights!         Quake I save: ddm3 Crazy eights!
  6703. 0    string    5\x0aEast_Side_Invertationa     Quake I save: ddm4 East side invertationa
  6704. 0    string    5\x0aSlaughterhouse         Quake I save: ddm5 Slaughterhouse
  6705. 0    string    5\x0aDOMINO             Quake I save: ddm6 Domino
  6706. 0    string    5\x0aSANDRA'S_LADDER         Quake I save: ddm7 Sandra's ladder
  6707.  
  6708.  
  6709. 0    string    MComprHD    MAME CHD compressed hard disk image,
  6710. >12    belong    x        version %lu
  6711.  
  6712. # doom - submitted by Jon Dowland
  6713.  
  6714. 0    string    =IWAD        doom main IWAD data
  6715. >4    lelong    x        containing %d lumps
  6716. 0    string    =PWAD        doom patch PWAD data
  6717. >4    lelong    x        containing %d lumps
  6718.  
  6719. # Type: SGF Smart Game Format
  6720. # URL:  http://www.red-bean.com/sgf/
  6721. # From: Eduardo Sabbatella <eduardo_sabbatella@yahoo.com.ar>
  6722.  
  6723. 2    regex/c    \\(;.*GM\\[[0-9]{1,2}\\]    Smart Game Format
  6724. >2    regex/c    GM\\[1\\]            - Go Game
  6725. >2    regex/c    GM\\[6\\]            - BackGammon Game
  6726. >2    regex/c    GM\\[11\\]            - Hex Game
  6727. >2    regex/c    GM\\[18\\]            - Amazons Game
  6728. >2    regex/c    GM\\[19\\]            - Octi Game
  6729. >2    regex/c    GM\\[20\\]            - Gess Game
  6730. >2    regex/c    GM\\[21\\]            - twix Game
  6731.  
  6732. #------------------------------------------------------------------------------
  6733. # gcc:  file(1) magic for GCC special files
  6734. #
  6735. 0    string        gpch        GCC precompiled header
  6736.  
  6737. # The version field is annoying.  It's 3 characters, not zero-terminated.
  6738. >5    byte        x            (version %c
  6739. >6    byte        x            \b%c
  6740. >7    byte        x            \b%c)
  6741.  
  6742. # 67 = 'C', 111 = 'o', 43 = '+', 79 = 'O'
  6743. >4    byte        67            for C
  6744. >4    byte        111            for Objective C
  6745. >4    byte        43            for C++
  6746. >4    byte        79            for Objective C++
  6747.  
  6748. #------------------------------------------------------------------------------
  6749. # GEOS files (Vidar Madsen, vidar@gimp.org)
  6750. # semi-commonly used in embedded and handheld systems.
  6751. 0    belong    0xc745c153    GEOS
  6752. >40    byte    1    executable
  6753. >40    byte    2    VMFile
  6754. >40    byte    3    binary
  6755. >40    byte    4    directory label
  6756. >40    byte    <1    unknown
  6757. >40    byte    >4    unknown
  6758. >4    string    >\0    \b, name "%s"
  6759. #>44    short    x    \b, version %d
  6760. #>46    short    x    \b.%d
  6761. #>48    short    x    \b, rev %d
  6762. #>50    short    x    \b.%d
  6763. #>52    short    x    \b, proto %d
  6764. #>54    short    x    \br%d
  6765. #>168    string    >\0    \b, copyright "%s"
  6766. #------------------------------------------------------------------------------
  6767. # GIMP Gradient: file(1) magic for the GIMP's gradient data files
  6768. # by Federico Mena <federico@nuclecu.unam.mx>
  6769.  
  6770. 0       string          GIMP\ Gradient  GIMP gradient data
  6771.  
  6772. #------------------------------------------------------------------------------
  6773. # XCF:  file(1) magic for the XCF image format used in the GIMP developed
  6774. #       by Spencer Kimball and Peter Mattis
  6775. #       ('Bucky' LaDieu, nega@vt.edu)
  6776.  
  6777. 0    string        gimp\ xcf    GIMP XCF image data,
  6778. >9    string        file        version 0,
  6779. >9    string        v        version
  6780. >>10    string        >\0        %s,
  6781. >14    belong        x        %lu x
  6782. >18    belong        x        %lu,
  6783. >22     belong          0               RGB Color
  6784. >22     belong          1               Greyscale
  6785. >22     belong          2               Indexed Color
  6786. >22    belong        >2        Unknown Image Type.
  6787.  
  6788. #------------------------------------------------------------------------------
  6789. # XCF:  file(1) magic for the patterns used in the GIMP, developed
  6790. #       by Spencer Kimball and Peter Mattis
  6791. #       ('Bucky' LaDieu, nega@vt.edu)
  6792.  
  6793. 20      string          GPAT            GIMP pattern data,
  6794. >24     string          x               %s
  6795.  
  6796. #------------------------------------------------------------------------------
  6797. # XCF:  file(1) magic for the brushes used in the GIMP, developed
  6798. #       by Spencer Kimball and Peter Mattis
  6799. #       ('Bucky' LaDieu, nega@vt.edu)
  6800.  
  6801. 20      string          GIMP            GIMP brush data
  6802. # GNOME keyring
  6803. # Contributed by Josh Triplett
  6804. # FIXME: Could be simplified if pstring supported two-byte counts
  6805. 0         string   GnomeKeyring\n\r\0\n GNOME keyring
  6806. >&0       ubyte    0                    \b, major version 0
  6807. >>&0      ubyte    0                    \b, minor version 0
  6808. >>>&0     ubyte    0                    \b, crypto type 0 (AEL)
  6809. >>>&0     ubyte    >0                   \b, crypto type %hhu (unknown)
  6810. >>>&1     ubyte    0                    \b, hash type 0 (MD5)
  6811. >>>&1     ubyte    >0                   \b, hash type %hhu (unknown)
  6812. >>>&2     ubelong  0xFFFFFFFF           \b, name NULL
  6813. >>>&2     ubelong  !0xFFFFFFFF
  6814. >>>>&-4   ubelong  >255                 \b, name too long for file's pstring type
  6815. >>>>&-4   ubelong  <256
  6816. >>>>>&-1  pstring  x                    \b, name "%s"
  6817. >>>>>>&0  ubeqdate x                    \b, last modified %s
  6818. >>>>>>&8  ubeqdate x                    \b, created %s
  6819. >>>>>>&16 ubelong  &1
  6820. >>>>>>>&0 ubelong  x                    \b, locked if idle for %u seconds
  6821. >>>>>>&16 ubelong  ^1                   \b, not locked if idle
  6822. >>>>>>&24 ubelong  x                    \b, hash iterations %u
  6823. >>>>>>&28 ubequad  x                    \b, salt %llu
  6824. >>>>>>&52 ubelong  x                    \b, %u item(s)
  6825. #------------------------------------------------------------------------------
  6826. # gnu:  file(1) magic for various GNU tools
  6827. #
  6828. # GNU nlsutils message catalog file format
  6829. #
  6830. 0    string        \336\22\4\225    GNU message catalog (little endian),
  6831. >4    lelong        x        revision %d,
  6832. >8    lelong        x        %d messages
  6833. 0    string        \225\4\22\336    GNU message catalog (big endian),
  6834. >4    belong        x        revision %d,
  6835. >8    belong        x        %d messages
  6836. # message catalogs, from Mitchum DSouza <m.dsouza@mrc-apu.cam.ac.uk>
  6837. 0    string        *nazgul*    Nazgul style compiled message catalog
  6838. >8    lelong        >0        \b, version %ld
  6839.  
  6840. # GnuPG
  6841. # The format is very similar to pgp
  6842. 0    string          \001gpg                 GPG key trust database
  6843. >4    byte            x                       version %d
  6844. # Note: magic.mime had 0x8501 for the next line instead of 0x8502
  6845. 0    beshort        0x8502            GPG encrypted data
  6846. !:mime    text/PGP # encoding: data
  6847.  
  6848. # This magic is not particularly good, as the keyrings don't have true
  6849. # magic. Nevertheless, it covers many keyrings.
  6850. 0       beshort         0x9901                  GPG key public ring
  6851. !:mime    application/x-gnupg-keyring
  6852.  
  6853. # Gnumeric spreadsheet
  6854. # This entry is only semi-helpful, as Gnumeric compresses its files, so
  6855. # they will ordinarily reported as "compressed", but at least -z helps
  6856. 39      string          =<gmr:Workbook           Gnumeric spreadsheet
  6857.  
  6858. # From: James Youngman <jay@gnu.org> 
  6859. # gnu find magic
  6860. 0    string    \0LOCATE    GNU findutils locate database data
  6861. >7    string    >\0        \b, format %s
  6862. >7    string    02        \b (frcode)
  6863.  
  6864. #------------------------------------------------------------------------------
  6865. # gnumeric:  file(1) magic for Gnumeric spreadsheet
  6866. # This entry is only semi-helpful, as Gnumeric compresses its files, so
  6867. # they will ordinarily reported as "compressed", but at least -z helps
  6868. 39    string    =<gmr:Workbook    Gnumeric spreadsheet
  6869. !:mime    application/x-gnumeric
  6870.  
  6871. #------------------------------------------------------------------------------
  6872. # ACE/gr and Grace type files - PLEASE DO NOT REMOVE THIS LINE
  6873. #
  6874. # ACE/gr binary
  6875. 0    string    \000\000\0001\000\000\0000\000\000\0000\000\000\0002\000\000\0000\000\000\0000\000\000\0003        old ACE/gr binary file
  6876. >39    byte    >0            - version %c
  6877. # ACE/gr ascii
  6878. 0    string    #\ xvgr\ parameter\ file    ACE/gr ascii file
  6879. 0    string    #\ xmgr\ parameter\ file    ACE/gr ascii file
  6880. 0    string    #\ ACE/gr\ parameter\ file    ACE/gr ascii file
  6881. # Grace projects
  6882. 0    string    #\ Grace\ project\ file        Grace project file
  6883. >23    string    @version\              (version
  6884. >>32    byte    >0                 %c
  6885. >>33    string    >\0                 \b.%.2s
  6886. >>35    string    >\0                 \b.%.2s)
  6887. # ACE/gr fit description files
  6888. 0    string    #\ ACE/gr\ fit\ description\     ACE/gr fit description file
  6889. # end of ACE/gr and Grace type files - PLEASE DO NOT REMOVE THIS LINE
  6890.  
  6891. #------------------------------------------------------------------------------
  6892. # gringotts:  file(1) magic for Gringotts
  6893. # http://devel.pluto.linux.it/projects/Gringotts/
  6894. # author: Germano Rizzo <mano@pluto.linux.it>
  6895. #GRG3????Y
  6896. 0    string    GRG        Gringotts data file
  6897. #file format 1
  6898. >3    string        1        v.1, MCRYPT S2K, SERPENT crypt, SHA-256 hash, ZLib lvl.9
  6899. #file format 2
  6900. >3    string        2        v.2, MCRYPT S2K, 
  6901. >>8    byte&0x70    0x00        RIJNDAEL-128 crypt,
  6902. >>8    byte&0x70    0x10        SERPENT crypt,
  6903. >>8    byte&0x70    0x20        TWOFISH crypt, 
  6904. >>8    byte&0x70    0x30        CAST-256 crypt,
  6905. >>8    byte&0x70    0x40        SAFER+ crypt,
  6906. >>8    byte&0x70    0x50        LOKI97 crypt,
  6907. >>8    byte&0x70    0x60        3DES crypt,
  6908. >>8    byte&0x70    0x70        RIJNDAEL-256 crypt,
  6909. >>8    byte&0x08    0x00        SHA1 hash,
  6910. >>8    byte&0x08    0x08        RIPEMD-160 hash,
  6911. >>8    byte&0x04    0x00        ZLib
  6912. >>8    byte&0x04    0x04        BZip2
  6913. >>8    byte&0x03    0x00        lvl.0
  6914. >>8    byte&0x03    0x01        lvl.3
  6915. >>8    byte&0x03    0x02        lvl.6
  6916. >>8    byte&0x03    0x03        lvl.9
  6917. #file format 3
  6918. >3    string        3        v.3, OpenPGP S2K, 
  6919. >>8    byte&0x70    0x00        RIJNDAEL-128 crypt,
  6920. >>8    byte&0x70    0x10        SERPENT crypt,
  6921. >>8    byte&0x70    0x20        TWOFISH crypt, 
  6922. >>8    byte&0x70    0x30        CAST-256 crypt,
  6923. >>8    byte&0x70    0x40        SAFER+ crypt,
  6924. >>8    byte&0x70    0x50        LOKI97 crypt,
  6925. >>8    byte&0x70    0x60        3DES crypt,
  6926. >>8    byte&0x70    0x70        RIJNDAEL-256 crypt,
  6927. >>8    byte&0x08    0x00        SHA1 hash,
  6928. >>8    byte&0x08    0x08        RIPEMD-160 hash,
  6929. >>8    byte&0x04    0x00        ZLib
  6930. >>8    byte&0x04    0x04        BZip2
  6931. >>8    byte&0x03    0x00        lvl.0
  6932. >>8    byte&0x03    0x01        lvl.3
  6933. >>8    byte&0x03    0x02        lvl.6
  6934. >>8    byte&0x03    0x03        lvl.9
  6935. #file format >3
  6936. >3    string        >3        v.%.1s (unknown details)
  6937.  
  6938. #------------------------------------------------------------------------------
  6939. # hitach-sh: file(1) magic for Hitachi Super-H
  6940. #
  6941. # Super-H COFF
  6942. #
  6943. 0    beshort        0x0500        Hitachi SH big-endian COFF
  6944. >18    beshort&0x0002    =0x0000        object
  6945. >18    beshort&0x0002    =0x0002        executable
  6946. >18    beshort&0x0008    =0x0008        \b, stripped
  6947. >18    beshort&0x0008    =0x0000        \b, not stripped
  6948. #
  6949. 0    leshort        0x0550        Hitachi SH little-endian COFF
  6950. >18    leshort&0x0002    =0x0000        object
  6951. >18    leshort&0x0002    =0x0002        executable
  6952. >18    leshort&0x0008    =0x0008        \b, stripped
  6953. >18    leshort&0x0008    =0x0000        \b, not stripped
  6954.  
  6955. #------------------------------------------------------------------------------
  6956. # hp:  file(1) magic for Hewlett Packard machines (see also "printer")
  6957. #
  6958. # XXX - somebody should figure out whether any byte order needs to be
  6959. # applied to the "TML" stuff; I'm assuming the Apollo stuff is
  6960. # big-endian as it was mostly 68K-based.
  6961. #
  6962. # I think the 500 series was the old stack-based machines, running a
  6963. # UNIX environment atop the "SUN kernel"; dunno whether it was
  6964. # big-endian or little-endian.
  6965. #
  6966. # Daniel Quinlan (quinlan@yggdrasil.com): hp200 machines are 68010 based;
  6967. # hp300 are 68020+68881 based; hp400 are also 68k.  The following basic
  6968. # HP magic is useful for reference, but using "long" magic is a better
  6969. # practice in order to avoid collisions.
  6970. #
  6971. # Guy Harris (guy@netapp.com): some additions to this list came from
  6972. # HP-UX 10.0's "/usr/include/sys/unistd.h" (68030, 68040, PA-RISC 1.1,
  6973. # 1.2, and 2.0).  The 1.2 and 2.0 stuff isn't in the HP-UX 10.0
  6974. # "/etc/magic", though, except for the "archive file relocatable library"
  6975. # stuff, and the 68030 and 68040 stuff isn't there at all - are they not
  6976. # used in executables, or have they just not yet updated "/etc/magic"
  6977. # completely?
  6978. #
  6979. # 0    beshort        200        hp200 (68010) BSD binary
  6980. # 0    beshort        300        hp300 (68020+68881) BSD binary
  6981. # 0    beshort        0x20c        hp200/300 HP-UX binary
  6982. # 0    beshort        0x20d        hp400 (68030) HP-UX binary
  6983. # 0    beshort        0x20e        hp400 (68040?) HP-UX binary
  6984. # 0    beshort        0x20b        PA-RISC1.0 HP-UX binary
  6985. # 0    beshort        0x210        PA-RISC1.1 HP-UX binary
  6986. # 0    beshort        0x211        PA-RISC1.2 HP-UX binary
  6987. # 0    beshort        0x214        PA-RISC2.0 HP-UX binary
  6988.  
  6989. #
  6990. # The "misc" stuff needs a byte order; the archives look suspiciously
  6991. # like the old 177545 archives (0xff65 = 0177545).
  6992. #
  6993. #### Old Apollo stuff
  6994. 0    beshort        0627        Apollo m68k COFF executable
  6995. >18    beshort        ^040000        not stripped
  6996. >22    beshort        >0        - version %ld
  6997. 0    beshort        0624        apollo a88k COFF executable
  6998. >18    beshort        ^040000        not stripped
  6999. >22    beshort        >0        - version %ld
  7000. 0       long            01203604016     TML 0123 byte-order format
  7001. 0       long            01702407010     TML 1032 byte-order format
  7002. 0       long            01003405017     TML 2301 byte-order format
  7003. 0       long            01602007412     TML 3210 byte-order format
  7004. #### PA-RISC 1.1
  7005. 0    belong         0x02100106    PA-RISC1.1 relocatable object
  7006. 0    belong         0x02100107    PA-RISC1.1 executable
  7007. >168    belong        &0x00000004    dynamically linked
  7008. >(144)    belong        0x054ef630    dynamically linked
  7009. >96    belong        >0        - not stripped
  7010.  
  7011. 0    belong         0x02100108    PA-RISC1.1 shared executable
  7012. >168    belong&0x4    0x4        dynamically linked
  7013. >(144)    belong        0x054ef630    dynamically linked
  7014. >96    belong        >0        - not stripped
  7015.  
  7016. 0    belong         0x0210010b    PA-RISC1.1 demand-load executable
  7017. >168    belong&0x4    0x4        dynamically linked
  7018. >(144)    belong        0x054ef630    dynamically linked
  7019. >96    belong        >0        - not stripped
  7020.  
  7021. 0    belong         0x0210010e    PA-RISC1.1 shared library
  7022. >96    belong        >0        - not stripped
  7023.  
  7024. 0    belong         0x0210010d    PA-RISC1.1 dynamic load library
  7025. >96    belong        >0        - not stripped
  7026.  
  7027. #### PA-RISC 2.0
  7028. 0    belong        0x02140106    PA-RISC2.0 relocatable object
  7029.  
  7030. 0       belong        0x02140107    PA-RISC2.0 executable
  7031. >168    belong        &0x00000004    dynamically linked
  7032. >(144)    belong        0x054ef630    dynamically linked
  7033. >96    belong        >0        - not stripped
  7034.  
  7035. 0       belong        0x02140108    PA-RISC2.0 shared executable
  7036. >168    belong        &0x00000004    dynamically linked
  7037. >(144)    belong        0x054ef630    dynamically linked
  7038. >96    belong        >0        - not stripped
  7039.  
  7040. 0       belong        0x0214010b    PA-RISC2.0 demand-load executable
  7041. >168    belong        &0x00000004    dynamically linked
  7042. >(144)    belong        0x054ef630    dynamically linked
  7043. >96    belong        >0        - not stripped
  7044.  
  7045. 0       belong        0x0214010e    PA-RISC2.0 shared library
  7046. >96    belong        >0        - not stripped
  7047.  
  7048. 0       belong        0x0214010d    PA-RISC2.0 dynamic load library
  7049. >96    belong        >0        - not stripped
  7050.  
  7051. #### 800
  7052. 0    belong         0x020b0106    PA-RISC1.0 relocatable object
  7053.  
  7054. 0    belong         0x020b0107    PA-RISC1.0 executable
  7055. >168    belong&0x4    0x4        dynamically linked
  7056. >(144)    belong        0x054ef630    dynamically linked
  7057. >96    belong        >0        - not stripped
  7058.  
  7059. 0    belong         0x020b0108    PA-RISC1.0 shared executable
  7060. >168    belong&0x4    0x4        dynamically linked
  7061. >(144)    belong        0x054ef630    dynamically linked
  7062. >96    belong        >0        - not stripped
  7063.  
  7064. 0    belong         0x020b010b    PA-RISC1.0 demand-load executable
  7065. >168    belong&0x4    0x4        dynamically linked
  7066. >(144)    belong        0x054ef630    dynamically linked
  7067. >96    belong        >0        - not stripped
  7068.  
  7069. 0    belong         0x020b010e    PA-RISC1.0 shared library
  7070. >96    belong        >0        - not stripped
  7071.  
  7072. 0    belong         0x020b010d    PA-RISC1.0 dynamic load library
  7073. >96    belong        >0        - not stripped
  7074.  
  7075. 0    belong        0x213c6172    archive file
  7076. >68    belong         0x020b0619    - PA-RISC1.0 relocatable library
  7077. >68    belong         0x02100619    - PA-RISC1.1 relocatable library
  7078. >68    belong         0x02110619    - PA-RISC1.2 relocatable library
  7079. >68    belong         0x02140619    - PA-RISC2.0 relocatable library
  7080.  
  7081. #### 500
  7082. 0    long        0x02080106    HP s500 relocatable executable
  7083. >16    long        >0        - version %ld
  7084.  
  7085. 0    long        0x02080107    HP s500 executable
  7086. >16    long        >0        - version %ld
  7087.  
  7088. 0    long        0x02080108    HP s500 pure executable
  7089. >16    long        >0        - version %ld
  7090.  
  7091. #### 200
  7092. 0    belong         0x020c0108    HP s200 pure executable
  7093. >4    beshort        >0        - version %ld
  7094. >8    belong        &0x80000000    save fp regs
  7095. >8    belong        &0x40000000    dynamically linked
  7096. >8    belong        &0x20000000    debuggable
  7097. >36    belong        >0        not stripped
  7098.  
  7099. 0    belong        0x020c0107    HP s200 executable
  7100. >4    beshort        >0        - version %ld
  7101. >8    belong        &0x80000000    save fp regs
  7102. >8    belong        &0x40000000    dynamically linked
  7103. >8    belong        &0x20000000    debuggable
  7104. >36    belong        >0        not stripped
  7105.  
  7106. 0    belong        0x020c010b    HP s200 demand-load executable
  7107. >4    beshort        >0        - version %ld
  7108. >8    belong        &0x80000000    save fp regs
  7109. >8    belong        &0x40000000    dynamically linked
  7110. >8    belong        &0x20000000    debuggable
  7111. >36    belong        >0        not stripped
  7112.  
  7113. 0    belong        0x020c0106    HP s200 relocatable executable
  7114. >4    beshort        >0        - version %ld
  7115. >6    beshort        >0        - highwater %d
  7116. >8    belong        &0x80000000    save fp regs
  7117. >8    belong        &0x20000000    debuggable
  7118. >8    belong        &0x10000000    PIC
  7119.  
  7120. 0    belong         0x020a0108    HP s200 (2.x release) pure executable
  7121. >4    beshort        >0        - version %ld
  7122. >36    belong        >0        not stripped
  7123.  
  7124. 0    belong        0x020a0107    HP s200 (2.x release) executable
  7125. >4    beshort        >0        - version %ld
  7126. >36    belong        >0        not stripped
  7127.  
  7128. 0    belong        0x020c010e    HP s200 shared library
  7129. >4    beshort        >0        - version %ld
  7130. >6    beshort        >0        - highwater %d
  7131. >36    belong        >0        not stripped
  7132.  
  7133. 0    belong        0x020c010d    HP s200 dynamic load library
  7134. >4    beshort        >0        - version %ld
  7135. >6    beshort        >0        - highwater %d
  7136. >36    belong        >0        not stripped
  7137.  
  7138. #### MISC
  7139. 0    long        0x0000ff65    HP old archive
  7140. 0    long        0x020aff65    HP s200 old archive
  7141. 0    long        0x020cff65    HP s200 old archive
  7142. 0    long        0x0208ff65    HP s500 old archive
  7143.  
  7144. 0    long        0x015821a6    HP core file
  7145.  
  7146. 0    long        0x4da7eee8    HP-WINDOWS font
  7147. >8    byte        >0        - version %ld
  7148. 0    string        Bitmapfile    HP Bitmapfile
  7149.  
  7150. 0    string        IMGfile    CIS     compimg HP Bitmapfile
  7151. # XXX - see "lif"
  7152. #0    short        0x8000        lif file
  7153. 0    long        0x020c010c    compiled Lisp
  7154.  
  7155. 0    string        msgcat01    HP NLS message catalog,
  7156. >8    long        >0        %d messages
  7157.  
  7158. # addendum to /etc/magic with HP-48sx file-types by phk@data.fls.dk 1jan92
  7159. 0    string        HPHP4        HP
  7160. >5    string        8        48 binary
  7161. >5    string        9        49 binary
  7162. >7    byte        >64        - Rev %c
  7163. >8    leshort        0x2911        (ADR)
  7164. >8    leshort        0x2933        (REAL)
  7165. >8    leshort        0x2955        (LREAL)
  7166. >8    leshort        0x2977        (COMPLX)
  7167. >8    leshort        0x299d        (LCOMPLX)
  7168. >8    leshort        0x29bf        (CHAR)
  7169. >8    leshort        0x29e8        (ARRAY)
  7170. >8    leshort        0x2a0a        (LNKARRAY)
  7171. >8    leshort        0x2a2c        (STRING)
  7172. >8    leshort        0x2a4e        (HXS)
  7173. >8    leshort        0x2a74        (LIST)
  7174. >8    leshort        0x2a96        (DIR)
  7175. >8    leshort        0x2ab8        (ALG)
  7176. >8    leshort        0x2ada        (UNIT)
  7177. >8    leshort        0x2afc        (TAGGED)
  7178. >8    leshort        0x2b1e        (GROB)
  7179. >8    leshort        0x2b40        (LIB)
  7180. >8    leshort        0x2b62        (BACKUP)
  7181. >8    leshort        0x2b88        (LIBDATA)
  7182. >8    leshort        0x2d9d        (PROG)
  7183. >8    leshort        0x2dcc        (CODE)
  7184. >8    leshort        0x2e48        (GNAME)
  7185. >8    leshort        0x2e6d        (LNAME)
  7186. >8    leshort        0x2e92        (XLIB)
  7187.  
  7188. 0    search/1    %%HP:        HP text
  7189. >6    string        T(0)        - T(0)
  7190. >6    string        T(1)        - T(1)
  7191. >6    string        T(2)        - T(2)
  7192. >6    string        T(3)        - T(3)
  7193. >10    string        A(D)        A(D)
  7194. >10    string        A(R)        A(R)
  7195. >10    string        A(G)        A(G)
  7196. >14    string        F(.)        F(.);
  7197. >14    string        F(,)        F(,);
  7198.  
  7199. 0    string        HP3        HP
  7200. >3    string        8        38
  7201. >3    string        9        39
  7202. >4    string        Bin        binary
  7203. >4    string        Asc        ASCII
  7204. >7    string        A        (Directory List)
  7205. >7    string        B        (Zaplet)
  7206. >7    string        C        (Note)
  7207. >7    string        D        (Program)
  7208. >7    string        E        (Variable)
  7209. >7    string        F        (List)
  7210. >7    string        G        (Matrix)
  7211. >7    string        H        (Library)
  7212. >7    string        I        (Target List)
  7213. >7    string        J        (ASCII Vector specification)
  7214. >7    string        K        (wildcard)
  7215.  
  7216. # hpBSD magic numbers
  7217. 0    beshort        200        hp200 (68010) BSD
  7218. >2    beshort        0407        impure binary
  7219. >2    beshort        0410        read-only binary
  7220. >2    beshort        0413        demand paged binary
  7221. 0    beshort        300        hp300 (68020+68881) BSD
  7222. >2    beshort        0407        impure binary
  7223. >2    beshort        0410        read-only binary
  7224. >2    beshort        0413        demand paged binary
  7225. #
  7226. # From David Gero <dgero@nortelnetworks.com>
  7227. # HP-UX 10.20 core file format from /usr/include/sys/core.h
  7228. # Unfortunately, HP-UX uses corehead blocks without specifying the order
  7229. # There are four we care about:
  7230. #     CORE_KERNEL, which starts with the string "HP-UX"
  7231. #     CORE_EXEC, which contains the name of the command
  7232. #     CORE_PROC, which contains the signal number that caused the core dump
  7233. #     CORE_FORMAT, which contains the version of the core file format (== 1)
  7234. # The only observed order in real core files is KERNEL, EXEC, FORMAT, PROC
  7235. # but we include all 6 variations of the order of the first 3, and
  7236. # assume that PROC will always be last
  7237. # Order 1: KERNEL, EXEC, FORMAT, PROC
  7238. 0x10        string    HP-UX
  7239. >0        belong    2
  7240. >>0xC        belong    0x3C
  7241. >>>0x4C        belong    0x100
  7242. >>>>0x58    belong    0x44
  7243. >>>>>0xA0    belong    1
  7244. >>>>>>0xAC    belong    4
  7245. >>>>>>>0xB0    belong    1
  7246. >>>>>>>>0xB4    belong    4        core file
  7247. >>>>>>>>>0x90    string    >\0        from '%s'
  7248. >>>>>>>>>0xC4    belong    3        - received SIGQUIT
  7249. >>>>>>>>>0xC4    belong    4        - received SIGILL
  7250. >>>>>>>>>0xC4    belong    5        - received SIGTRAP
  7251. >>>>>>>>>0xC4    belong    6        - received SIGABRT
  7252. >>>>>>>>>0xC4    belong    7        - received SIGEMT
  7253. >>>>>>>>>0xC4    belong    8        - received SIGFPE
  7254. >>>>>>>>>0xC4    belong    10        - received SIGBUS
  7255. >>>>>>>>>0xC4    belong    11        - received SIGSEGV
  7256. >>>>>>>>>0xC4    belong    12        - received SIGSYS
  7257. >>>>>>>>>0xC4    belong    33        - received SIGXCPU
  7258. >>>>>>>>>0xC4    belong    34        - received SIGXFSZ
  7259. # Order 2: KERNEL, FORMAT, EXEC, PROC
  7260. >>>0x4C        belong    1
  7261. >>>>0x58    belong    4
  7262. >>>>>0x5C    belong    1
  7263. >>>>>>0x60    belong    0x100
  7264. >>>>>>>0x6C    belong    0x44
  7265. >>>>>>>>0xB4    belong    4        core file
  7266. >>>>>>>>>0xA4    string    >\0        from '%s'
  7267. >>>>>>>>>0xC4    belong    3        - received SIGQUIT
  7268. >>>>>>>>>0xC4    belong    4        - received SIGILL
  7269. >>>>>>>>>0xC4    belong    5        - received SIGTRAP
  7270. >>>>>>>>>0xC4    belong    6        - received SIGABRT
  7271. >>>>>>>>>0xC4    belong    7        - received SIGEMT
  7272. >>>>>>>>>0xC4    belong    8        - received SIGFPE
  7273. >>>>>>>>>0xC4    belong    10        - received SIGBUS
  7274. >>>>>>>>>0xC4    belong    11        - received SIGSEGV
  7275. >>>>>>>>>0xC4    belong    12        - received SIGSYS
  7276. >>>>>>>>>0xC4    belong    33        - received SIGXCPU
  7277. >>>>>>>>>0xC4    belong    34        - received SIGXFSZ
  7278. # Order 3: FORMAT, KERNEL, EXEC, PROC
  7279. 0x24        string    HP-UX
  7280. >0        belong    1
  7281. >>0xC        belong    4
  7282. >>>0x10        belong    1
  7283. >>>>0x14    belong    2
  7284. >>>>>0x20    belong    0x3C
  7285. >>>>>>0x60    belong    0x100
  7286. >>>>>>>0x6C    belong    0x44
  7287. >>>>>>>>0xB4    belong    4        core file
  7288. >>>>>>>>>0xA4    string    >\0        from '%s'
  7289. >>>>>>>>>0xC4    belong    3        - received SIGQUIT
  7290. >>>>>>>>>0xC4    belong    4        - received SIGILL
  7291. >>>>>>>>>0xC4    belong    5        - received SIGTRAP
  7292. >>>>>>>>>0xC4    belong    6        - received SIGABRT
  7293. >>>>>>>>>0xC4    belong    7        - received SIGEMT
  7294. >>>>>>>>>0xC4    belong    8        - received SIGFPE
  7295. >>>>>>>>>0xC4    belong    10        - received SIGBUS
  7296. >>>>>>>>>0xC4    belong    11        - received SIGSEGV
  7297. >>>>>>>>>0xC4    belong    12        - received SIGSYS
  7298. >>>>>>>>>0xC4    belong    33        - received SIGXCPU
  7299. >>>>>>>>>0xC4    belong    34        - received SIGXFSZ
  7300. # Order 4: EXEC, KERNEL, FORMAT, PROC
  7301. 0x64        string    HP-UX
  7302. >0        belong    0x100
  7303. >>0xC        belong    0x44
  7304. >>>0x54        belong    2
  7305. >>>>0x60    belong    0x3C
  7306. >>>>>0xA0    belong    1
  7307. >>>>>>0xAC    belong    4
  7308. >>>>>>>0xB0    belong    1
  7309. >>>>>>>>0xB4    belong    4        core file
  7310. >>>>>>>>>0x44    string    >\0        from '%s'
  7311. >>>>>>>>>0xC4    belong    3        - received SIGQUIT
  7312. >>>>>>>>>0xC4    belong    4        - received SIGILL
  7313. >>>>>>>>>0xC4    belong    5        - received SIGTRAP
  7314. >>>>>>>>>0xC4    belong    6        - received SIGABRT
  7315. >>>>>>>>>0xC4    belong    7        - received SIGEMT
  7316. >>>>>>>>>0xC4    belong    8        - received SIGFPE
  7317. >>>>>>>>>0xC4    belong    10        - received SIGBUS
  7318. >>>>>>>>>0xC4    belong    11        - received SIGSEGV
  7319. >>>>>>>>>0xC4    belong    12        - received SIGSYS
  7320. >>>>>>>>>0xC4    belong    33        - received SIGXCPU
  7321. >>>>>>>>>0xC4    belong    34        - received SIGXFSZ
  7322. # Order 5: FORMAT, EXEC, KERNEL, PROC
  7323. 0x78        string    HP-UX
  7324. >0        belong    1
  7325. >>0xC        belong    4
  7326. >>>0x10        belong    1
  7327. >>>>0x14    belong    0x100
  7328. >>>>>0x20    belong    0x44
  7329. >>>>>>0x68    belong    2
  7330. >>>>>>>0x74    belong    0x3C
  7331. >>>>>>>>0xB4    belong    4        core file
  7332. >>>>>>>>>0x58    string    >\0        from '%s'
  7333. >>>>>>>>>0xC4    belong    3        - received SIGQUIT
  7334. >>>>>>>>>0xC4    belong    4        - received SIGILL
  7335. >>>>>>>>>0xC4    belong    5        - received SIGTRAP
  7336. >>>>>>>>>0xC4    belong    6        - received SIGABRT
  7337. >>>>>>>>>0xC4    belong    7        - received SIGEMT
  7338. >>>>>>>>>0xC4    belong    8        - received SIGFPE
  7339. >>>>>>>>>0xC4    belong    10        - received SIGBUS
  7340. >>>>>>>>>0xC4    belong    11        - received SIGSEGV
  7341. >>>>>>>>>0xC4    belong    12        - received SIGSYS
  7342. >>>>>>>>>0xC4    belong    33        - received SIGXCPU
  7343. >>>>>>>>>0xC4    belong    34        - received SIGXFSZ
  7344. # Order 6: EXEC, FORMAT, KERNEL, PROC
  7345. >0        belong    0x100
  7346. >>0xC        belong    0x44
  7347. >>>0x54        belong    1
  7348. >>>>0x60    belong    4
  7349. >>>>>0x64    belong    1
  7350. >>>>>>0x68    belong    2
  7351. >>>>>>>0x74    belong    0x2C
  7352. >>>>>>>>0xB4    belong    4        core file
  7353. >>>>>>>>>0x44    string    >\0        from '%s'
  7354. >>>>>>>>>0xC4    belong    3        - received SIGQUIT
  7355. >>>>>>>>>0xC4    belong    4        - received SIGILL
  7356. >>>>>>>>>0xC4    belong    5        - received SIGTRAP
  7357. >>>>>>>>>0xC4    belong    6        - received SIGABRT
  7358. >>>>>>>>>0xC4    belong    7        - received SIGEMT
  7359. >>>>>>>>>0xC4    belong    8        - received SIGFPE
  7360. >>>>>>>>>0xC4    belong    10        - received SIGBUS
  7361. >>>>>>>>>0xC4    belong    11        - received SIGSEGV
  7362. >>>>>>>>>0xC4    belong    12        - received SIGSYS
  7363. >>>>>>>>>0xC4    belong    33        - received SIGXCPU
  7364. >>>>>>>>>0xC4    belong    34        - received SIGXFSZ
  7365.  
  7366. # From: AMAKAWA Shuhei <sa264@cam.ac.uk>
  7367. #0    string    HPHP49-            HP49 binary
  7368.  
  7369.  
  7370. #------------------------------------------------------------------------------
  7371. # human68k:  file(1) magic for Human68k (X680x0 DOS) binary formats
  7372. # Magic too short!
  7373. #0        string    HU        Human68k
  7374. #>68        string    LZX        LZX compressed
  7375. #>>72        string    >\0        (version %s)
  7376. #>(8.L+74)    string    LZX        LZX compressed
  7377. #>>(8.L+78)    string    >\0        (version %s)
  7378. #>60        belong    >0        binded
  7379. #>(8.L+66)    string    #HUPAIR        hupair
  7380. #>0        string    HU        X executable
  7381. #>(8.L+74)    string    #LIBCV1        - linked PD LIBC ver 1
  7382. #>4        belong    >0        - base address 0x%x
  7383. #>28        belong    >0        not stripped
  7384. #>32        belong    >0        with debug information
  7385. #0        beshort    0x601a        Human68k Z executable
  7386. #0        beshort    0x6000        Human68k object file
  7387. #0        belong    0xd1000000    Human68k ar binary archive
  7388. #0        belong    0xd1010000    Human68k ar ascii archive
  7389. #0        beshort    0x0068        Human68k lib archive
  7390. #4        string    LZX        Human68k LZX compressed
  7391. #>8        string    >\0        (version %s)
  7392. #>4        string    LZX        R executable
  7393. #2        string    #HUPAIR        Human68k hupair R executable
  7394.  
  7395. #------------------------------------------------------------------------------
  7396. # ibm370:  file(1) magic for IBM 370 and compatibles.
  7397. #
  7398. # "ibm370" said that 0x15d == 0535 was "ibm 370 pure executable".
  7399. # What the heck *is* "USS/370"?
  7400. # AIX 4.1's "/etc/magic" has
  7401. #
  7402. #    0    short        0535        370 sysV executable 
  7403. #    >12    long        >0        not stripped
  7404. #    >22    short        >0        - version %d
  7405. #    >30    long        >0        - 5.2 format
  7406. #    0    short        0530        370 sysV pure executable 
  7407. #    >12    long        >0        not stripped
  7408. #    >22    short        >0        - version %d
  7409. #    >30    long        >0        - 5.2 format
  7410. #
  7411. # instead of the "USS/370" versions of the same magic numbers.
  7412. #
  7413. 0    beshort        0537        370 XA sysV executable 
  7414. >12    belong        >0        not stripped
  7415. >22    beshort        >0        - version %d
  7416. >30    belong        >0        - 5.2 format
  7417. 0    beshort        0532        370 XA sysV pure executable 
  7418. >12    belong        >0        not stripped
  7419. >22    beshort        >0        - version %d
  7420. >30    belong        >0        - 5.2 format
  7421. 0    beshort        054001        370 sysV pure executable
  7422. >12    belong        >0        not stripped
  7423. 0    beshort        055001        370 XA sysV pure executable
  7424. >12    belong        >0        not stripped
  7425. 0    beshort        056401        370 sysV executable
  7426. >12    belong        >0        not stripped
  7427. 0    beshort        057401        370 XA sysV executable
  7428. >12    belong        >0        not stripped
  7429. 0       beshort        0531        SVR2 executable (Amdahl-UTS)
  7430. >12    belong        >0        not stripped
  7431. >24     belong        >0        - version %ld
  7432. 0    beshort        0534        SVR2 pure executable (Amdahl-UTS)
  7433. >12    belong        >0        not stripped
  7434. >24    belong        >0        - version %ld
  7435. 0    beshort        0530        SVR2 pure executable (USS/370)
  7436. >12    belong        >0        not stripped
  7437. >24    belong        >0        - version %ld
  7438. 0    beshort        0535        SVR2 executable (USS/370)
  7439. >12    belong        >0        not stripped
  7440. >24    belong        >0        - version %ld
  7441.  
  7442. #------------------------------------------------------------------------------
  7443. # ibm6000:  file(1) magic for RS/6000 and the RT PC.
  7444. #
  7445. 0    beshort        0x01df        executable (RISC System/6000 V3.1) or obj module
  7446. >12    belong        >0        not stripped
  7447. # Breaks sun4 statically linked execs.
  7448. #0      beshort        0x0103        executable (RT Version 2) or obj module
  7449. #>2    byte        0x50        pure
  7450. #>28    belong        >0        not stripped
  7451. #>6    beshort        >0        - version %ld
  7452. 0    beshort        0x0104        shared library
  7453. 0    beshort        0x0105        ctab data
  7454. 0    beshort        0xfe04        structured file
  7455. 0    string        0xabcdef    AIX message catalog
  7456. 0    belong        0x000001f9    AIX compiled message catalog
  7457. 0    string        \<aiaff>    archive
  7458. 0    string        \<bigaf>    archive (big format)
  7459.  
  7460.  
  7461. #------------------------------------------------------------------------------
  7462. # iff:    file(1) magic for Interchange File Format (see also "audio" & "images")
  7463. #
  7464. # Daniel Quinlan (quinlan@yggdrasil.com) -- IFF was designed by Electronic
  7465. # Arts for file interchange.  It has also been used by Apple, SGI, and
  7466. # especially Commodore-Amiga.
  7467. #
  7468. # IFF files begin with an 8 byte FORM header, followed by a 4 character
  7469. # FORM type, which is followed by the first chunk in the FORM.
  7470.  
  7471. 0    string        FORM        IFF data
  7472. #>4    belong        x        \b, FORM is %d bytes long
  7473. # audio formats
  7474. >8    string        AIFF        \b, AIFF audio
  7475. !:mime    audio/x-aiff
  7476. >8    string        AIFC        \b, AIFF-C compressed audio
  7477. !:mime    audio/x-aiff
  7478. >8    string        8SVX        \b, 8SVX 8-bit sampled sound voice
  7479. !:mime    audio/x-aiff
  7480. >8    string        16SV        \b, 16SV 16-bit sampled sound voice
  7481. >8    string        SAMP        \b, SAMP sampled audio
  7482. >8    string        MAUD        \b, MAUD MacroSystem audio
  7483. >8    string        SMUS        \b, SMUS simple music
  7484. >8    string        CMUS        \b, CMUS complex music
  7485. # image formats
  7486. >8    string        ILBMBMHD    \b, ILBM interleaved image
  7487. >>20    beshort        x        \b, %d x
  7488. >>22    beshort        x        %d
  7489. >8    string        RGBN        \b, RGBN 12-bit RGB image
  7490. >8    string        RGB8        \b, RGB8 24-bit RGB image
  7491. >8    string        DEEP        \b, DEEP TVPaint/XiPaint image
  7492. >8    string        DR2D        \b, DR2D 2-D object
  7493. >8    string        TDDD        \b, TDDD 3-D rendering
  7494. >8    string        LWOB        \b, LWOB 3-D object
  7495. >8    string        LWO2        \b, LWO2 3-D object, v2
  7496. >8    string        LWLO        \b, LWLO 3-D layered object
  7497. >8    string        REAL        \b, REAL Real3D rendering
  7498. >8    string        MC4D        \b, MC4D MaxonCinema4D rendering
  7499. >8    string        ANIM        \b, ANIM animation
  7500. >8    string        YAFA        \b, YAFA animation
  7501. >8    string        SSA\         \b, SSA super smooth animation
  7502. >8    string        ACBM        \b, ACBM continuous image
  7503. >8    string        FAXX        \b, FAXX fax image
  7504. # other formats
  7505. >8    string        FTXT        \b, FTXT formatted text
  7506. >8    string        CTLG        \b, CTLG message catalog
  7507. >8    string        PREF        \b, PREF preferences
  7508. >8    string        DTYP        \b, DTYP datatype description
  7509. >8    string        PTCH        \b, PTCH binary patch
  7510. >8    string        AMFF        \b, AMFF AmigaMetaFile format
  7511. >8    string        WZRD        \b, WZRD StormWIZARD resource
  7512. >8    string        DOC\         \b, DOC desktop publishing document
  7513.  
  7514. # These go at the end of the iff rules
  7515. #
  7516. # I don't see why these might collide with anything else.
  7517. #
  7518. # Interactive Fiction related formats
  7519. #
  7520. >8    string        IFRS        \b, Blorb Interactive Fiction
  7521. >>24    string        Exec        with executable chunk
  7522. >8    string          IFZS        \b, Z-machine or Glulx saved game file (Quetzal)
  7523. #------------------------------------------------------------------------------
  7524. # images:  file(1) magic for image formats (see also "iff", and "c-lang" for
  7525. # XPM bitmaps)
  7526. #
  7527. # originally from jef@helios.ee.lbl.gov (Jef Poskanzer),
  7528. # additions by janl@ifi.uio.no as well as others. Jan also suggested
  7529. # merging several one- and two-line files into here.
  7530. #
  7531. # little magic: PCX (first byte is 0x0a)
  7532.  
  7533. # Targa - matches `povray', `ppmtotga' and `xv' outputs
  7534. # by Philippe De Muyter <phdm@macqel.be>
  7535. # at 2, byte ImgType must be 1, 2, 3, 9, 10 or 11
  7536. # at 1, byte CoMapType must be 1 if ImgType is 1 or 9, 0 otherwise
  7537. # at 3, leshort Index is 0 for povray, ppmtotga and xv outputs
  7538. # `xv' recognizes only a subset of the following (RGB with pixelsize = 24)
  7539. # `tgatoppm' recognizes a superset (Index may be anything)
  7540. 1    belong&0xfff7ffff    0x01010000    Targa image data - Map
  7541. >2    byte&8            8        - RLE
  7542. >12    leshort            >0        %hd x
  7543. >14    leshort            >0        %hd
  7544. 1    belong&0xfff7ffff    0x00020000    Targa image data - RGB
  7545. >2    byte&8            8        - RLE
  7546. >12    leshort            >0        %hd x
  7547. >14    leshort            >0        %hd
  7548. 1    belong&0xfff7ffff    0x00030000    Targa image data - Mono
  7549. >2    byte&8            8        - RLE
  7550. >12    leshort            >0        %hd x
  7551. >14    leshort            >0        %hd
  7552.  
  7553. # PBMPLUS images
  7554. # The next byte following the magic is always whitespace.
  7555. 0    search/1    P1        Netpbm PBM image text
  7556. !:mime    image/x-portable-bitmap
  7557. 0    search/1    P2        Netpbm PGM image text
  7558. !:mime    image/x-portable-greymap
  7559. 0    search/1    P3        Netpbm PPM image text
  7560. !:mime    image/x-portable-pixmap
  7561. 0    string        P4        Netpbm PBM "rawbits" image data
  7562. !:mime    image/x-portable-bitmap
  7563. 0    string        P5        Netpbm PGM "rawbits" image data
  7564. !:mime    image/x-portable-greymap
  7565. 0    string        P6        Netpbm PPM "rawbits" image data
  7566. !:mime    image/x-portable-pixmap
  7567. 0    string        P7        Netpbm PAM image file
  7568. !:mime    image/x-portable-pixmap
  7569.  
  7570. # From: bryanh@giraffe-data.com (Bryan Henderson)
  7571. 0    string        \117\072    Solitaire Image Recorder format
  7572. >4    string        \013        MGI Type 11
  7573. >4    string        \021        MGI Type 17
  7574. 0    string        .MDA        MicroDesign data
  7575. >21    byte        48        version 2
  7576. >21    byte        51        version 3
  7577. 0    string        .MDP        MicroDesign page data
  7578. >21    byte        48        version 2
  7579. >21    byte        51        version 3
  7580.  
  7581. # NIFF (Navy Interchange File Format, a modification of TIFF) images
  7582. # [GRR:  this *must* go before TIFF]
  7583. 0    string        IIN1        NIFF image data
  7584. !:mime    image/x-niff
  7585.  
  7586. # Tag Image File Format, from Daniel Quinlan (quinlan@yggdrasil.com)
  7587. # The second word of TIFF files is the TIFF version number, 42, which has
  7588. # never changed.  The TIFF specification recommends testing for it.
  7589. 0    string        MM\x00\x2a    TIFF image data, big-endian
  7590. !:mime    image/tiff
  7591. 0    string        II\x2a\x00    TIFF image data, little-endian
  7592. !:mime    image/tiff
  7593.  
  7594. # PNG [Portable Network Graphics, or "PNG's Not GIF"] images
  7595. # (Greg Roelofs, newt@uchicago.edu)
  7596. # (Albert Cahalan, acahalan@cs.uml.edu)
  7597. #
  7598. # 137 P N G \r \n ^Z \n [4-byte length] H E A D [HEAD data] [HEAD crc] ...
  7599. #
  7600. 0    string        \x89PNG        PNG image data,
  7601. !:mime    image/png
  7602. >4    belong        !0x0d0a1a0a    CORRUPTED,
  7603. >4    belong        0x0d0a1a0a
  7604. >>16    belong        x        %ld x
  7605. >>20    belong        x        %ld,
  7606. >>24    byte        x        %d-bit
  7607. >>25    byte        0        grayscale,
  7608. >>25    byte        2        \b/color RGB,
  7609. >>25    byte        3        colormap,
  7610. >>25    byte        4        gray+alpha,
  7611. >>25    byte        6        \b/color RGBA,
  7612. #>>26    byte        0        deflate/32K,
  7613. >>28    byte        0        non-interlaced
  7614. >>28    byte        1        interlaced
  7615. 1    string        PNG        PNG image data, CORRUPTED
  7616.  
  7617. # possible GIF replacements; none yet released!
  7618. # (Greg Roelofs, newt@uchicago.edu)
  7619. #
  7620. # GRR 950115:  this was mine ("Zip GIF"):
  7621. 0    string        GIF94z        ZIF image (GIF+deflate alpha)
  7622. !:mime    image/x-unknown
  7623. #
  7624. # GRR 950115:  this is Jeremy Wohl's Free Graphics Format (better):
  7625. #                    
  7626. 0    string        FGF95a        FGF image (GIF+deflate beta)
  7627. !:mime    image/x-unknown
  7628. #
  7629. # GRR 950115:  this is Thomas Boutell's Portable Bitmap Format proposal
  7630. # (best; not yet implemented):
  7631. #                    
  7632. 0    string        PBF        PBF image (deflate compression)
  7633. !:mime    image/x-unknown
  7634.  
  7635. # GIF
  7636. 0    string        GIF8        GIF image data
  7637. !:mime    image/gif
  7638. >4    string        7a        \b, version 8%s,
  7639. >4    string        9a        \b, version 8%s,
  7640. >6    leshort        >0        %hd x
  7641. >8    leshort        >0        %hd
  7642. #>10    byte        &0x80        color mapped,
  7643. #>10    byte&0x07    =0x00        2 colors
  7644. #>10    byte&0x07    =0x01        4 colors
  7645. #>10    byte&0x07    =0x02        8 colors
  7646. #>10    byte&0x07    =0x03        16 colors
  7647. #>10    byte&0x07    =0x04        32 colors
  7648. #>10    byte&0x07    =0x05        64 colors
  7649. #>10    byte&0x07    =0x06        128 colors
  7650. #>10    byte&0x07    =0x07        256 colors
  7651.  
  7652. # ITC (CMU WM) raster files.  It is essentially a byte-reversed Sun raster,
  7653. # 1 plane, no encoding.
  7654. 0    string        \361\0\100\273    CMU window manager raster image data
  7655. >4    lelong        >0        %d x
  7656. >8    lelong        >0        %d,
  7657. >12    lelong        >0        %d-bit
  7658.  
  7659. # Magick Image File Format
  7660. 0    string        id=ImageMagick    MIFF image data
  7661.  
  7662. # Artisan
  7663. 0    long        1123028772    Artisan image data
  7664. >4    long        1        \b, rectangular 24-bit
  7665. >4    long        2        \b, rectangular 8-bit with colormap
  7666. >4    long        3        \b, rectangular 32-bit (24-bit with matte)
  7667.  
  7668. # FIG (Facility for Interactive Generation of figures), an object-based format
  7669. 0    search/1    #FIG        FIG image text
  7670. >5    string        x        \b, version %.3s
  7671.  
  7672. # PHIGS
  7673. 0    string        ARF_BEGARF        PHIGS clear text archive
  7674. 0    string        @(#)SunPHIGS        SunPHIGS
  7675. # version number follows, in the form m.n
  7676. >40    string        SunBin            binary
  7677. >32    string        archive            archive
  7678.  
  7679. # GKS (Graphics Kernel System)
  7680. 0    string        GKSM        GKS Metafile
  7681. >24    string        SunGKS        \b, SunGKS
  7682.  
  7683. # CGM image files
  7684. 0    string        BEGMF        clear text Computer Graphics Metafile
  7685. # XXX - questionable magic
  7686. #0    beshort&0xffe0    0x0020        binary Computer Graphics Metafile
  7687. #0    beshort        0x3020        character Computer Graphics Metafile
  7688.  
  7689. # MGR bitmaps  (Michael Haardt, u31b3hs@pool.informatik.rwth-aachen.de)
  7690. 0    string    yz    MGR bitmap, modern format, 8-bit aligned
  7691. 0    string    zz    MGR bitmap, old format, 1-bit deep, 16-bit aligned
  7692. 0    string    xz    MGR bitmap, old format, 1-bit deep, 32-bit aligned
  7693. 0    string    yx    MGR bitmap, modern format, squeezed
  7694.  
  7695. # Fuzzy Bitmap (FBM) images
  7696. 0    string        %bitmap\0    FBM image data
  7697. >30    long        0x31        \b, mono
  7698. >30    long        0x33        \b, color
  7699.  
  7700. # facsimile data
  7701. 1    string        PC\ Research,\ Inc    group 3 fax data
  7702. >29    byte        0        \b, normal resolution (204x98 DPI)
  7703. >29    byte        1        \b, fine resolution (204x196 DPI)
  7704. # From: Herbert Rosmanith <herp@wildsau.idv.uni.linz.at>
  7705. 0    string        Sfff        structured fax file
  7706.  
  7707.  
  7708. # PC bitmaps (OS/2, Windows BMP files)  (Greg Roelofs, newt@uchicago.edu)
  7709. 0    string        BM        PC bitmap data
  7710. !:mime    image/x-ms-bmp
  7711. >14    leshort        12        \b, OS/2 1.x format
  7712. >>18    leshort        x        \b, %d x
  7713. >>20    leshort        x        %d
  7714. >14    leshort        64        \b, OS/2 2.x format
  7715. >>18    leshort        x        \b, %d x
  7716. >>20    leshort        x        %d
  7717. >14    leshort        40        \b, Windows 3.x format
  7718. >>18    lelong        x        \b, %d x
  7719. >>22    lelong        x        %d x
  7720. >>28    leshort        x        %d
  7721. # Too simple - MPi
  7722. #0    string        IC        PC icon data
  7723. #0    string        PI        PC pointer image data
  7724. #0    string        CI        PC color icon data
  7725. #0    string        CP        PC color pointer image data
  7726. # Conflicts with other entries [BABYL]
  7727. #0    string        BA        PC bitmap array data
  7728.  
  7729. # XPM icons (Greg Roelofs, newt@uchicago.edu)
  7730. # note possible collision with C/REXX entry in c-lang; currently commented out
  7731. 0    search/1    /*\ XPM\ */    X pixmap image text
  7732.  
  7733. # Utah Raster Toolkit RLE images (janl@ifi.uio.no)
  7734. 0    leshort        0xcc52        RLE image data,
  7735. >6    leshort        x        %d x
  7736. >8    leshort        x        %d
  7737. >2    leshort        >0        \b, lower left corner: %d
  7738. >4    leshort        >0        \b, lower right corner: %d
  7739. >10    byte&0x1    =0x1        \b, clear first
  7740. >10    byte&0x2    =0x2        \b, no background
  7741. >10    byte&0x4    =0x4        \b, alpha channel
  7742. >10    byte&0x8    =0x8        \b, comment
  7743. >11    byte        >0        \b, %d color channels
  7744. >12    byte        >0        \b, %d bits per pixel
  7745. >13    byte        >0        \b, %d color map channels
  7746.  
  7747. # image file format (Robert Potter, potter@cs.rochester.edu)
  7748. 0    string        Imagefile\ version-    iff image data
  7749. # this adds the whole header (inc. version number), informative but longish
  7750. >10    string        >\0        %s
  7751.  
  7752. # Sun raster images, from Daniel Quinlan (quinlan@yggdrasil.com)
  7753. 0    belong        0x59a66a95    Sun raster image data
  7754. >4    belong        >0        \b, %d x
  7755. >8    belong        >0        %d,
  7756. >12    belong        >0        %d-bit,
  7757. #>16    belong        >0        %d bytes long,
  7758. >20    belong        0        old format,
  7759. #>20    belong        1        standard,
  7760. >20    belong        2        compressed,
  7761. >20    belong        3        RGB,
  7762. >20    belong        4        TIFF,
  7763. >20    belong        5        IFF,
  7764. >20    belong        0xffff        reserved for testing,
  7765. >24    belong        0        no colormap
  7766. >24    belong        1        RGB colormap
  7767. >24    belong        2        raw colormap
  7768. #>28    belong        >0        colormap is %d bytes long
  7769.  
  7770. # SGI image file format, from Daniel Quinlan (quinlan@yggdrasil.com)
  7771. #
  7772. # See
  7773. #    http://reality.sgi.com/grafica/sgiimage.html
  7774. #
  7775. 0    beshort        474        SGI image data
  7776. #>2    byte        0        \b, verbatim
  7777. >2    byte        1        \b, RLE
  7778. #>3    byte        1        \b, normal precision
  7779. >3    byte        2        \b, high precision
  7780. >4    beshort        x        \b, %d-D
  7781. >6    beshort        x        \b, %d x
  7782. >8    beshort        x        %d
  7783. >10    beshort        x        \b, %d channel
  7784. >10    beshort        !1        \bs
  7785. >80    string        >0        \b, "%s"
  7786.  
  7787. 0    string        IT01        FIT image data
  7788. >4    belong        x        \b, %d x
  7789. >8    belong        x        %d x
  7790. >12    belong        x        %d
  7791. #
  7792. 0    string        IT02        FIT image data
  7793. >4    belong        x        \b, %d x
  7794. >8    belong        x        %d x
  7795. >12    belong        x        %d
  7796. #
  7797. 2048    string        PCD_IPI        Kodak Photo CD image pack file
  7798. >0xe02    byte&0x03    0x00        , landscape mode
  7799. >0xe02    byte&0x03    0x01        , portrait mode
  7800. >0xe02    byte&0x03    0x02        , landscape mode
  7801. >0xe02    byte&0x03    0x03        , portrait mode
  7802. 0    string        PCD_OPA        Kodak Photo CD overview pack file
  7803.  
  7804. # FITS format.  Jeff Uphoff <juphoff@tarsier.cv.nrao.edu>
  7805. # FITS is the Flexible Image Transport System, the de facto standard for
  7806. # data and image transfer, storage, etc., for the astronomical community.
  7807. # (FITS floating point formats are big-endian.)
  7808. 0    string    SIMPLE\ \ =    FITS image data
  7809. >109    string    8        \b, 8-bit, character or unsigned binary integer
  7810. >108    string    16        \b, 16-bit, two's complement binary integer
  7811. >107    string    \ 32        \b, 32-bit, two's complement binary integer
  7812. >107    string    -32        \b, 32-bit, floating point, single precision
  7813. >107    string    -64        \b, 64-bit, floating point, double precision
  7814.  
  7815. # other images
  7816. 0    string    This\ is\ a\ BitMap\ file    Lisp Machine bit-array-file
  7817. #0    string        =!!        Bennet Yee's "face" format
  7818.  
  7819. # From SunOS 5.5.1 "/etc/magic" - appeared right before Sun raster image
  7820. # stuff.
  7821. #
  7822. 0    beshort        0x1010        PEX Binary Archive
  7823.  
  7824. # DICOM medical imaging data
  7825. 128    string    DICM            DICOM medical imaging data
  7826. !:mime    application/dicom
  7827.  
  7828. # XWD - X Window Dump file.
  7829. #   As described in /usr/X11R6/include/X11/XWDFile.h
  7830. #   used by the xwd program.
  7831. #   Bradford Castalia, idaeim, 1/01
  7832. 4    belong    7            XWD X Window Dump image data
  7833. >100    string    >\0            \b, "%s"
  7834. >16    belong    x            \b, %dx
  7835. >20    belong    x            \b%dx
  7836. >12    belong    x            \b%d
  7837.  
  7838. # PDS - Planetary Data System
  7839. #   These files use Parameter Value Language in the header section.
  7840. #   Unfortunately, there is no certain magic, but the following
  7841. #   strings have been found to be most likely.
  7842. 0    string    NJPL1I00        PDS (JPL) image data
  7843. 2    string    NJPL1I            PDS (JPL) image data
  7844. 0    string    CCSD3ZF            PDS (CCSD) image data
  7845. 2    string    CCSD3Z            PDS (CCSD) image data
  7846. 0    string    PDS_            PDS image data
  7847. 0    string    LBLSIZE=        PDS (VICAR) image data
  7848.  
  7849. # pM8x: ATARI STAD compressed bitmap format
  7850. #
  7851. # from Oskar Schirmer <schirmer@scara.com> Feb 2, 2001
  7852. # p M 8 5/6 xx yy zz data...
  7853. # Atari ST STAD bitmap is always 640x400, bytewise runlength compressed.
  7854. # bytes either run horizontally (pM85) or vertically (pM86). yy is the
  7855. # most frequent byte, xx and zz are runlength escape codes, where xx is
  7856. # used for runs of yy.
  7857. #
  7858. 0    string    pM85        Atari ST STAD bitmap image data (hor)
  7859. >5    byte    0x00        (white background)
  7860. >5    byte    0xFF        (black background)
  7861. 0    string    pM86        Atari ST STAD bitmap image data (vert)
  7862. >5    byte    0x00        (white background)
  7863. >5    byte    0xFF        (black background)
  7864.  
  7865. # G├╝rkan Seng├╝n <gurkan@linuks.mine.nu>, www.linuks.mine.nu
  7866. # http://www.atarimax.com/jindroush.atari.org/afmtatr.html
  7867. 0    leshort    0x0296        Atari ATR image
  7868.  
  7869. # XXX:
  7870. # This is bad magic 0x5249 == 'RI' conflicts with RIFF and other
  7871. # magic.
  7872. # SGI RICE image file <mpruett@sgi.com>
  7873. #0    beshort    0x5249        RICE image
  7874. #>2    beshort    x        v%d
  7875. #>4    beshort    x        (%d x
  7876. #>6    beshort    x        %d)
  7877. #>8    beshort    0        8 bit
  7878. #>8    beshort    1        10 bit
  7879. #>8    beshort    2        12 bit
  7880. #>8    beshort    3        13 bit
  7881. #>10    beshort    0        4:2:2
  7882. #>10    beshort    1        4:2:2:4
  7883. #>10    beshort    2        4:4:4
  7884. #>10    beshort    3        4:4:4:4
  7885. #>12    beshort    1        RGB
  7886. #>12    beshort    2        CCIR601
  7887. #>12    beshort    3        RP175
  7888. #>12    beshort    4        YUV
  7889.  
  7890. #------------------------------------------------------------------------------
  7891. #
  7892. # Marco Schmidt (marcoschmidt@users.sourceforge.net) -- an image  file format
  7893. # for the EPOC operating system, which is used with PDAs like those from Psion
  7894. #
  7895. # see http://huizen.dds.nl/~frodol/psiconv/html/Index.html for a description
  7896. # of various EPOC file formats
  7897.  
  7898. 0    string \x37\x00\x00\x10\x42\x00\x00\x10\x00\x00\x00\x00\x39\x64\x39\x47 EPOC MBM image file
  7899.  
  7900. # PCX image files
  7901. # From: Dan Fandrich <dan@coneharvesters.com>
  7902. 0    beshort        0x0a00    PCX ver. 2.5 image data
  7903. 0    beshort        0x0a02    PCX ver. 2.8 image data, with palette
  7904. 0    beshort        0x0a03    PCX ver. 2.8 image data, without palette
  7905. 0    beshort        0x0a04    PCX for Windows image data
  7906. 0    beshort        0x0a05    PCX ver. 3.0 image data
  7907. >4    leshort        x      bounding box [%hd,
  7908. >6    leshort        x      %hd] -
  7909. >8    leshort        x      [%hd,
  7910. >10    leshort        x      %hd],
  7911. >65    byte        >1    %d planes each of
  7912. >3    byte        x    %hhd-bit
  7913. >68    byte        0    image,
  7914. >68    byte        1    colour,
  7915. >68    byte        2    grayscale,
  7916. >68    byte        >2    image,
  7917. >68    byte        <0    image,
  7918. >12    leshort        >0    %hd x
  7919. >>14    leshort        x      %hd dpi,
  7920. >2    byte        0    uncompressed
  7921. >2    byte        1    RLE compressed
  7922.  
  7923. # Adobe Photoshop
  7924. 0    string        8BPS Adobe Photoshop Image
  7925. !:mime    image/vnd.adobe.photoshop
  7926.  
  7927. # XV thumbnail indicator (ThMO)
  7928. 0    string        P7\ 332        XV thumbnail image data
  7929.  
  7930. # NITF is defined by United States MIL-STD-2500A
  7931. 0    string    NITF    National Imagery Transmission Format
  7932. >25    string    >\0    dated %.14s
  7933.  
  7934. # GEM Image: Version 1, Headerlen 8 (Wolfram Kleff)
  7935. 0    belong        0x00010008    GEM Image data
  7936. >12    beshort        x        %d x
  7937. >14    beshort        x        %d,
  7938. >4    beshort        x        %d planes,
  7939. >8    beshort        x        %d x
  7940. >10    beshort        x        %d pixelsize
  7941.  
  7942. # GEM Metafile (Wolfram Kleff)
  7943. 0    lelong        0x0018FFFF    GEM Metafile data
  7944. >4    leshort        x        version %d
  7945.  
  7946. #
  7947. # SMJPEG. A custom Motion JPEG format used by Loki Entertainment
  7948. # Software Torbjorn Andersson <d91tan@Update.UU.SE>.
  7949. #
  7950. 0    string    \0\nSMJPEG    SMJPEG
  7951. >8    belong    x        %d.x data
  7952. # According to the specification you could find any number of _TXT
  7953. # headers here, but I can't think of any way of handling that. None of
  7954. # the SMJPEG files I tried it on used this feature. Even if such a
  7955. # file is encountered the output should still be reasonable.
  7956. >16    string    _SND        \b,
  7957. >>24    beshort    >0        %d Hz
  7958. >>26    byte    8        8-bit
  7959. >>26    byte    16        16-bit
  7960. >>28    string    NONE        uncompressed
  7961. # >>28    string    APCM        ADPCM compressed
  7962. >>27    byte    1        mono
  7963. >>28    byte    2        stereo
  7964. # Help! Isn't there any way to avoid writing this part twice?
  7965. >>32    string    _VID        \b,
  7966. # >>>48    string    JFIF        JPEG
  7967. >>>40    belong    >0        %d frames
  7968. >>>44    beshort    >0        (%d x
  7969. >>>46    beshort    >0        %d)
  7970. >16    string    _VID        \b,
  7971. # >>32    string    JFIF        JPEG
  7972. >>24    belong    >0        %d frames
  7973. >>28    beshort    >0        (%d x
  7974. >>30    beshort    >0        %d)
  7975.  
  7976. 0    string    Paint\ Shop\ Pro\ Image\ File    Paint Shop Pro Image File
  7977.  
  7978. # "thumbnail file" (icon)
  7979. # descended from "xv", but in use by other applications as well (Wolfram Kleff)
  7980. 0       string          P7\ 332         XV "thumbnail file" (icon) data
  7981.  
  7982. # taken from fkiss: (<yav@mte.biglobe.ne.jp> ?)
  7983. 0       string          KiSS            KISS/GS
  7984. >4      byte            16              color
  7985. >>5     byte            x               %d bit
  7986. >>8     leshort         x               %d colors
  7987. >>10    leshort         x               %d groups
  7988. >4      byte            32              cell
  7989. >>5     byte            x               %d bit
  7990. >>8     leshort         x               %d x
  7991. >>10    leshort         x               %d
  7992. >>12    leshort         x               +%d
  7993. >>14    leshort         x               +%d
  7994.  
  7995. # Webshots (www.webshots.com), by John Harrison
  7996. 0       string          C\253\221g\230\0\0\0 Webshots Desktop .wbz file
  7997.  
  7998. # Hercules DASD image files
  7999. # From Jan Jaeger <jj@septa.nl>
  8000. 0       string  CKD_P370        Hercules CKD DASD image file
  8001. >8      long    x               \b, %d heads per cylinder
  8002. >12     long    x               \b, track size %d bytes
  8003. >16     byte    x               \b, device type 33%2.2X
  8004.  
  8005. 0       string  CKD_C370        Hercules compressed CKD DASD image file
  8006. >8      long    x               \b, %d heads per cylinder
  8007. >12     long    x               \b, track size %d bytes
  8008. >16     byte    x               \b, device type 33%2.2X
  8009.  
  8010. 0       string  CKD_S370        Hercules CKD DASD shadow file
  8011. >8      long    x               \b, %d heads per cylinder
  8012. >12     long    x               \b, track size %d bytes
  8013. >16     byte    x               \b, device type 33%2.2X
  8014.  
  8015. # Squeak images and programs - etoffi@softhome.net
  8016. 0    string        \146\031\0\0    Squeak image data
  8017. 0    search/1    'From\040Squeak    Squeak program text
  8018.  
  8019. # partimage: file(1) magic for PartImage files (experimental, incomplete)
  8020. # Author: Hans-Joachim Baader <hjb@pro-linux.de>
  8021. 0        string    PaRtImAgE-VoLuMe    PartImage
  8022. >0x0020        string    0.6.1        file version %s
  8023. >>0x0060    lelong    >-1        volume %ld
  8024. #>>0x0064 8 byte identifier
  8025. #>>0x007c reserved
  8026. >>0x0200    string    >\0        type %s
  8027. >>0x1400    string    >\0        device %s,
  8028. >>0x1600    string    >\0        original filename %s,
  8029. # Some fields omitted
  8030. >>0x2744    lelong    0        not compressed
  8031. >>0x2744    lelong    1        gzip compressed
  8032. >>0x2744    lelong    2        bzip2 compressed
  8033. >>0x2744    lelong    >2        compressed with unknown algorithm
  8034. >0x0020        string    >0.6.1        file version %s
  8035. >0x0020        string    <0.6.1        file version %s
  8036.  
  8037. # DCX is multi-page PCX, using a simple header of up to 1024
  8038. # offsets for the respective PCX components.
  8039. # From: Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>
  8040. 0    lelong    987654321    DCX multi-page PCX image data
  8041.  
  8042. # Simon Walton <simonw@matteworld.com>
  8043. # Kodak Cineon format for scanned negatives
  8044. # http://www.kodak.com/US/en/motion/support/dlad/
  8045. 0    lelong  0xd75f2a80    Cineon image data
  8046. >200    belong  >0        \b, %ld x
  8047. >204    belong  >0        %ld
  8048.  
  8049.  
  8050. # Bio-Rad .PIC is an image format used by microscope control systems
  8051. # and related image processing software used by biologists.
  8052. # From: Vebjorn Ljosa <vebjorn@ljosa.com>
  8053. 54    leshort 12345        Bio-Rad .PIC Image File
  8054. >0    leshort >0        %hd x
  8055. >2    leshort >0        %hd,
  8056. >4    leshort =1        1 image in file
  8057. >4    leshort >1        %hd images in file
  8058.  
  8059. # From Jan "Yenya" Kasprzak <kas@fi.muni.cz>
  8060. # The description of *.mrw format can be found at
  8061. # http://www.dalibor.cz/minolta/raw_file_format.htm
  8062. 0    string    \000MRM            Minolta Dimage camera raw image data
  8063.  
  8064. # From: stephane.loeuillet@tiscali.f
  8065. # http://www.djvuzone.org/
  8066. 0    string    AT&TFORM        DjVu Image file
  8067. !:mime    image/vnd.djvu
  8068.  
  8069. # From Marc Espie
  8070. 0    lelong    20000630        OpenEXR image data
  8071.  
  8072. # From: Tom Hilinski <tom.hilinski@comcast.net>
  8073. # http://www.unidata.ucar.edu/packages/netcdf/
  8074. 0    string    CDF\001            NetCDF Data Format data
  8075.  
  8076. #-----------------------------------------------------------------------
  8077. # Hierarchical Data Format, used to facilitate scientific data exchange
  8078. # specifications at http://hdf.ncsa.uiuc.edu/
  8079. 0    belong    0x0e031301    Hierarchical Data Format (version 4) data
  8080. !:mime    application/x-hdf
  8081. 0    string    \211HDF\r\n\032    Hierarchical Data Format (version 5) data
  8082. !:mime    application/x-hdf
  8083.  
  8084. # From: Tobias Burnus <burnus@net-b.de>
  8085. # Xara (for a while: Corel Xara) is a graphic package, see
  8086. # http://www.xara.com/ for Windows and as GPL application for Linux
  8087. 0    string    XARA\243\243    Xara graphics file
  8088.  
  8089. # http://www.cartesianinc.com/Tech/
  8090. 0    string    CPC\262        Cartesian Perceptual Compression image
  8091. !:mime    image/x-cpi
  8092.  
  8093. # From Albert Cahalan <acahalan@gmail.com>
  8094. # puredigital used it for the CVS disposable camcorder
  8095. #8       lelong  4       ZBM bitmap image data
  8096. #>4      leshort x       %u x
  8097. #>6      leshort x       %u
  8098.  
  8099. # From Albert Cahalan <acahalan@gmail.com>
  8100. # uncompressed 5:6:5 HighColor image for OLPC XO firmware icons
  8101. 0       string C565     OLPC firmware icon image data
  8102. >4      leshort x       %u x
  8103. >6      leshort x       %u
  8104.  
  8105. # Applied Images - Image files from Cytovision
  8106. # Gustavo Junior Alves <gjalves@gjalves.com.br>
  8107. 0    string    \xce\xda\xde\xfa    Cytovision Metaphases file
  8108. 0    string    \xed\xad\xef\xac    Cytovision Karyotype file
  8109. 0    string    \x0b\x00\x03\x00    Cytovision FISH Probe file
  8110. 0    string    \xed\xfe\xda\xbe    Cytovision FLEX file
  8111. 0    string    \xed\xab\xed\xfe    Cytovision FLEX file
  8112. 0    string    \xad\xfd\xea\xad    Cytovision RATS file
  8113.  
  8114. # Type: Ulead Photo Explorer5 (.pe5)
  8115. # URL:  http://www.jisyo.com/cgibin/view.cgi?EXT=pe5 (Japanese)
  8116. # From: Simon Horman <horms@debian.org>
  8117. 0    string    IIO2H    Ulead Photo Explorer5
  8118.  
  8119. # Type:    X11 cursor
  8120. # URL:    http://webcvs.freedesktop.org/mime/shared-mime-info/freedesktop.org.xml.in?view=markup
  8121. # From:    Mathias Brodala <info@noctus.net>
  8122. 0    string    Xcur    X11 cursor
  8123.  
  8124. #------------------------------------------------------------------------------
  8125. # inform:  file(1) magic for Inform interactive fiction language
  8126.  
  8127. # URL:  http://www.inform-fiction.org/
  8128. # From: Reuben Thomas <rrt@sc3d.org>
  8129.  
  8130. 0    search/cB/100    constant\ story        Inform source text
  8131.  
  8132. #------------------------------------------------------------------------------
  8133. # intel:  file(1) magic for x86 Unix
  8134. #
  8135. # Various flavors of x86 UNIX executable/object (other than Xenix, which
  8136. # is in "microsoft").  DOS is in "msdos"; the ambitious soul can do
  8137. # Windows as well.
  8138. #
  8139. # Windows NT belongs elsewhere, as you need x86 and MIPS and Alpha and
  8140. # whatever comes next (HP-PA Hummingbird?).  OS/2 may also go elsewhere
  8141. # as well, if, as, and when IBM makes it portable.
  8142. #
  8143. # The `versions' should be un-commented if they work for you.
  8144. # (Was the problem just one of endianness?)
  8145. #
  8146. 0    leshort        0502        basic-16 executable
  8147. >12    lelong        >0        not stripped
  8148. #>22    leshort        >0        - version %ld
  8149. 0    leshort        0503        basic-16 executable (TV)
  8150. >12    lelong        >0        not stripped
  8151. #>22    leshort        >0        - version %ld
  8152. 0    leshort        0510        x86 executable
  8153. >12    lelong        >0        not stripped
  8154. 0    leshort        0511        x86 executable (TV)
  8155. >12    lelong        >0        not stripped
  8156. 0    leshort        =0512        iAPX 286 executable small model (COFF)
  8157. >12    lelong        >0        not stripped
  8158. #>22    leshort        >0        - version %ld
  8159. 0    leshort        =0522        iAPX 286 executable large model (COFF)
  8160. >12    lelong        >0        not stripped
  8161. #>22    leshort        >0        - version %ld
  8162. # SGI labeled the next entry as "iAPX 386 executable" --Dan Quinlan
  8163. 0    leshort        =0514        80386 COFF executable
  8164. >12    lelong        >0        not stripped
  8165. >22    leshort        >0        - version %ld
  8166.  
  8167. # rom: file(1) magic for BIOS ROM Extensions found in intel machines
  8168. #      mapped into memory between 0xC0000 and 0xFFFFF
  8169. # From G├╝rkan Seng├╝n <gurkan@linuks.mine.nu>, www.linuks.mine.nu
  8170. 0        beshort         0x55AA       BIOS (ia32) ROM Ext.
  8171. >5       string          USB          USB
  8172. >7       string          LDR          UNDI image
  8173. >30      string          IBM          IBM comp. Video
  8174. >26      string          Adaptec      Adaptec
  8175. >28      string          Adaptec      Adaptec
  8176. >42      string          PROMISE      Promise
  8177. >2       byte            x            (%d*512)
  8178.  
  8179. #------------------------------------------------------------------------------
  8180. # interleaf:  file(1) magic for InterLeaf TPS:
  8181. #
  8182. 0    string        =\210OPS    Interleaf saved data
  8183. 0    string        =<!OPS        Interleaf document text
  8184. >5    string        ,\ Version\ =    \b, version
  8185. >>17    string        >\0        %.3s
  8186.  
  8187. #------------------------------------------------------------------------------
  8188. # island:  file(1) magic for IslandWite/IslandDraw, from SunOS 5.5.1
  8189. # "/etc/magic":
  8190. # From: guy@netapp.com (Guy Harris)
  8191. #
  8192. 4    string        pgscriptver    IslandWrite document
  8193. 13    string        DrawFile    IslandDraw document
  8194.  
  8195.  
  8196. #------------------------------------------------------------------------------
  8197. # ispell:  file(1) magic for ispell
  8198. #
  8199. # Ispell 3.0 has a magic of 0x9601 and ispell 3.1 has 0x9602.  This magic
  8200. # will match 0x9600 through 0x9603 in *both* little endian and big endian.
  8201. # (No other current magic entries collide.)
  8202. #
  8203. # Updated by Daniel Quinlan (quinlan@yggdrasil.com)
  8204. #
  8205. 0    leshort&0xFFFC    0x9600        little endian ispell
  8206. >0    byte        0        hash file (?),
  8207. >0    byte        1        3.0 hash file,
  8208. >0    byte        2        3.1 hash file,
  8209. >0    byte        3        hash file (?),
  8210. >2    leshort        0x00        8-bit, no capitalization, 26 flags
  8211. >2    leshort        0x01        7-bit, no capitalization, 26 flags
  8212. >2    leshort        0x02        8-bit, capitalization, 26 flags
  8213. >2    leshort        0x03        7-bit, capitalization, 26 flags
  8214. >2    leshort        0x04        8-bit, no capitalization, 52 flags
  8215. >2    leshort        0x05        7-bit, no capitalization, 52 flags
  8216. >2    leshort        0x06        8-bit, capitalization, 52 flags
  8217. >2    leshort        0x07        7-bit, capitalization, 52 flags
  8218. >2    leshort        0x08        8-bit, no capitalization, 128 flags
  8219. >2    leshort        0x09        7-bit, no capitalization, 128 flags
  8220. >2    leshort        0x0A        8-bit, capitalization, 128 flags
  8221. >2    leshort        0x0B        7-bit, capitalization, 128 flags
  8222. >2    leshort        0x0C        8-bit, no capitalization, 256 flags
  8223. >2    leshort        0x0D        7-bit, no capitalization, 256 flags
  8224. >2    leshort        0x0E        8-bit, capitalization, 256 flags
  8225. >2    leshort        0x0F        7-bit, capitalization, 256 flags
  8226. >4    leshort        >0        and %d string characters
  8227. 0    beshort&0xFFFC    0x9600        big endian ispell
  8228. >1    byte        0        hash file (?),
  8229. >1    byte        1        3.0 hash file,
  8230. >1    byte        2        3.1 hash file,
  8231. >1    byte        3        hash file (?),
  8232. >2    beshort        0x00        8-bit, no capitalization, 26 flags
  8233. >2    beshort        0x01        7-bit, no capitalization, 26 flags
  8234. >2    beshort        0x02        8-bit, capitalization, 26 flags
  8235. >2    beshort        0x03        7-bit, capitalization, 26 flags
  8236. >2    beshort        0x04        8-bit, no capitalization, 52 flags
  8237. >2    beshort        0x05        7-bit, no capitalization, 52 flags
  8238. >2    beshort        0x06        8-bit, capitalization, 52 flags
  8239. >2    beshort        0x07        7-bit, capitalization, 52 flags
  8240. >2    beshort        0x08        8-bit, no capitalization, 128 flags
  8241. >2    beshort        0x09        7-bit, no capitalization, 128 flags
  8242. >2    beshort        0x0A        8-bit, capitalization, 128 flags
  8243. >2    beshort        0x0B        7-bit, capitalization, 128 flags
  8244. >2    beshort        0x0C        8-bit, no capitalization, 256 flags
  8245. >2    beshort        0x0D        7-bit, no capitalization, 256 flags
  8246. >2    beshort        0x0E        8-bit, capitalization, 256 flags
  8247. >2    beshort        0x0F        7-bit, capitalization, 256 flags
  8248. >4    beshort        >0        and %d string characters
  8249. # ispell 4.0 hash files  kromJx <kromJx@crosswinds.net>
  8250. # Ispell 4.0
  8251. 0       string          ISPL            ispell
  8252. >4      long            x               hash file version %d,
  8253. >8      long            x               lexletters %d,
  8254. >12     long            x               lexsize %d,
  8255. >16     long            x               hashsize %d,
  8256. >20     long            x               stblsize %d
  8257. #------------------------------------------------------------
  8258. # Java ByteCode and Mach-O binaries (e.g., Mac OS X) use the
  8259. # same magic number, 0xcafebabe, so they are both handled
  8260. # in the entry called "cafebabe".
  8261. #------------------------------------------------------------
  8262. # Java serialization
  8263. # From Martin Pool (m.pool@pharos.com.au)
  8264. 0    beshort        0xaced        Java serialization data
  8265. >2    beshort        >0x0004        \b, version %d
  8266.  
  8267. 0    belong        0xfeedfeed    Java KeyStore
  8268. !:mime    application/x-java-keystore
  8269. 0    belong        0xcececece    Java JCE KeyStore
  8270. !:mime    application/x-java-jce-keystore
  8271.  
  8272. # Dalvik .dex format. http://retrodev.com/android/dexformat.html
  8273. # From <mkf@google.com> "Mike Fleming"
  8274. 0    string    dex\n
  8275. >0    regex    dex\n[0-9][0-9][0-9]\0    Dalvik dex file
  8276. >4    string    >000            version %s
  8277. 0    string    dey\n
  8278. >0    regex    dey\n[0-9][0-9][0-9]\0    Dalvik dex file (optimized for host)
  8279. >4    string    >000            version %s
  8280.  
  8281.  
  8282. #------------------------------------------------------------------------------
  8283. # JPEG images
  8284. # SunOS 5.5.1 had
  8285. #
  8286. #    0    string        \377\330\377\340    JPEG file
  8287. #    0    string        \377\330\377\356    JPG file
  8288. #
  8289. # both of which turn into "JPEG image data" here.
  8290. #
  8291. 0    beshort        0xffd8        JPEG image data
  8292. !:mime    image/jpeg
  8293. >6    string        JFIF        \b, JFIF standard
  8294. # The following added by Erik Rossen <rossen@freesurf.ch> 1999-09-06
  8295. # in a vain attempt to add image size reporting for JFIF.  Note that these
  8296. # tests are not fool-proof since some perfectly valid JPEGs are currently
  8297. # impossible to specify in magic(4) format.
  8298. # First, a little JFIF version info:
  8299. >>11    byte        x        \b %d.
  8300. >>12    byte        x        \b%02d
  8301. # Next, the resolution or aspect ratio of the image:
  8302. #>>13    byte        0        \b, aspect ratio
  8303. #>>13    byte        1        \b, resolution (DPI)
  8304. #>>13    byte        2        \b, resolution (DPCM)
  8305. #>>4    beshort        x        \b, segment length %d
  8306. # Next, show thumbnail info, if it exists:
  8307. >>18    byte        !0        \b, thumbnail %dx
  8308. >>>19    byte        x        \b%d
  8309.  
  8310. # EXIF moved down here to avoid reporting a bogus version number,
  8311. # and EXIF version number printing added.
  8312. #   - Patrik R=E5dman <patrik+file-magic@iki.fi>
  8313. >6    string        Exif        \b, EXIF standard
  8314. # Look for EXIF IFD offset in IFD 0, and then look for EXIF version tag in EXIF IFD.
  8315. # All possible combinations of entries have to be enumerated, since no looping
  8316. # is possible. And both endians are possible...
  8317. # The combinations included below are from real-world JPEGs.
  8318. # Little-endian
  8319. >>12    string        II        
  8320. # IFD 0 Entry #5:
  8321. >>>70    leshort        0x8769          
  8322. # EXIF IFD Entry #1:
  8323. >>>>(78.l+14)    leshort    0x9000        
  8324. >>>>>(78.l+23)    byte    x        %c
  8325. >>>>>(78.l+24)    byte    x        \b.%c
  8326. >>>>>(78.l+25)    byte    !0x30        \b%c
  8327. # IFD 0 Entry #9:
  8328. >>>118    leshort        0x8769          
  8329. # EXIF IFD Entry #3:
  8330. >>>>(126.l+38)    leshort    0x9000        
  8331. >>>>>(126.l+47)    byte    x        %c
  8332. >>>>>(126.l+48)    byte    x        \b.%c
  8333. >>>>>(126.l+49)    byte    !0x30        \b%c
  8334. # IFD 0 Entry #10
  8335. >>>130    leshort        0x8769          
  8336. # EXIF IFD Entry #3:
  8337. >>>>(138.l+38)    leshort    0x9000        
  8338. >>>>>(138.l+47)    byte    x        %c
  8339. >>>>>(138.l+48)    byte    x        \b.%c
  8340. >>>>>(138.l+49)    byte    !0x30        \b%c
  8341. # EXIF IFD Entry #4:
  8342. >>>>(138.l+50)    leshort    0x9000        
  8343. >>>>>(138.l+59)    byte    x        %c
  8344. >>>>>(138.l+60)    byte    x        \b.%c
  8345. >>>>>(138.l+61)    byte    !0x30        \b%c
  8346. # EXIF IFD Entry #5:
  8347. >>>>(138.l+62)    leshort    0x9000        
  8348. >>>>>(138.l+71)    byte    x        %c
  8349. >>>>>(138.l+72)    byte    x        \b.%c
  8350. >>>>>(138.l+73)    byte    !0x30        \b%c
  8351. # IFD 0 Entry #11
  8352. >>>142    leshort        0x8769          
  8353. # EXIF IFD Entry #3:
  8354. >>>>(150.l+38)    leshort    0x9000        
  8355. >>>>>(150.l+47)    byte    x        %c
  8356. >>>>>(150.l+48)    byte    x        \b.%c
  8357. >>>>>(150.l+49)    byte    !0x30        \b%c
  8358. # EXIF IFD Entry #4:
  8359. >>>>(150.l+50)    leshort    0x9000        
  8360. >>>>>(150.l+59)    byte    x        %c
  8361. >>>>>(150.l+60)    byte    x        \b.%c
  8362. >>>>>(150.l+61)    byte    !0x30        \b%c
  8363. # EXIF IFD Entry #5:
  8364. >>>>(150.l+62)    leshort    0x9000        
  8365. >>>>>(150.l+71)    byte    x        %c
  8366. >>>>>(150.l+72)    byte    x        \b.%c
  8367. >>>>>(150.l+73)    byte    !0x30        \b%c
  8368. # Big-endian
  8369. >>12    string        MM        
  8370. # IFD 0 Entry #9:
  8371. >>>118    beshort        0x8769          
  8372. # EXIF IFD Entry #1:
  8373. >>>>(126.L+14)    beshort    0x9000        
  8374. >>>>>(126.L+23)    byte    x        %c
  8375. >>>>>(126.L+24)    byte    x        \b.%c
  8376. >>>>>(126.L+25)    byte    !0x30        \b%c
  8377. # EXIF IFD Entry #3:
  8378. >>>>(126.L+38)    beshort    0x9000        
  8379. >>>>>(126.L+47)    byte    x        %c
  8380. >>>>>(126.L+48)    byte    x        \b.%c
  8381. >>>>>(126.L+49)    byte    !0x30        \b%c
  8382. # IFD 0 Entry #10
  8383. >>>130    beshort        0x8769          
  8384. # EXIF IFD Entry #3:
  8385. >>>>(138.L+38)    beshort    0x9000        
  8386. >>>>>(138.L+47)    byte    x        %c
  8387. >>>>>(138.L+48)    byte    x        \b.%c
  8388. >>>>>(138.L+49)    byte    !0x30        \b%c
  8389. # EXIF IFD Entry #5:
  8390. >>>>(138.L+62)    beshort    0x9000        
  8391. >>>>>(138.L+71)    byte    x        %c
  8392. >>>>>(138.L+72)    byte    x        \b.%c
  8393. >>>>>(138.L+73)    byte    !0x30        \b%c
  8394. # IFD 0 Entry #11
  8395. >>>142    beshort        0x8769          
  8396. # EXIF IFD Entry #4:
  8397. >>>>(150.L+50)    beshort    0x9000        
  8398. >>>>>(150.L+59)    byte    x        %c
  8399. >>>>>(150.L+60)    byte    x        \b.%c
  8400. >>>>>(150.L+61)    byte    !0x30        \b%c
  8401. # Here things get sticky.  We can do ONE MORE marker segment with
  8402. # indirect addressing, and that's all.  It would be great if we could
  8403. # do pointer arithemetic like in an assembler language.  Christos?
  8404. # And if there was some sort of looping construct to do searches, plus a few
  8405. # named accumulators, it would be even more effective...
  8406. # At least we can show a comment if no other segments got inserted before:
  8407. >(4.S+5)    byte        0xFE
  8408. >>(4.S+8)    string        >\0        \b, comment: "%s"
  8409. #>(4.S+5)    byte        0xFE        \b, comment
  8410. #>>(4.S+6)    beshort        x        \b length=%d
  8411. #>>(4.S+8)    string        >\0        \b, "%s"
  8412. # Or, we can show the encoding type (I've included only the three most common)
  8413. # and image dimensions if we are lucky and the SOFn (image segment) is here:
  8414. >(4.S+5)    byte        0xC0        \b, baseline
  8415. >>(4.S+6)    byte        x        \b, precision %d
  8416. >>(4.S+7)    beshort        x        \b, %dx
  8417. >>(4.S+9)    beshort        x        \b%d
  8418. >(4.S+5)    byte        0xC1        \b, extended sequential
  8419. >>(4.S+6)    byte        x        \b, precision %d
  8420. >>(4.S+7)    beshort        x        \b, %dx
  8421. >>(4.S+9)    beshort        x        \b%d
  8422. >(4.S+5)    byte        0xC2        \b, progressive
  8423. >>(4.S+6)    byte        x        \b, precision %d
  8424. >>(4.S+7)    beshort        x        \b, %dx
  8425. >>(4.S+9)    beshort        x        \b%d
  8426. # I've commented-out quantisation table reporting.  I doubt anyone cares yet.
  8427. #>(4.S+5)    byte        0xDB        \b, quantisation table
  8428. #>>(4.S+6)    beshort        x        \b length=%d
  8429. #>14    beshort        x        \b, %d x
  8430. #>16    beshort        x        \b %d
  8431.  
  8432. # HSI is Handmade Software's proprietary JPEG encoding scheme
  8433. 0    string        hsi1        JPEG image data, HSI proprietary
  8434.  
  8435. # From: David Santinoli <david@santinoli.com>
  8436. 0    string        \x00\x00\x00\x0C\x6A\x50\x20\x20\x0D\x0A\x87\x0A    JPEG 2000 image data
  8437.  
  8438. # Type: JPEG 2000 codesream
  8439. # From: Mathieu Malaterre <mathieu.malaterre@gmail.com>
  8440. 0    belong        0xff4fff51                        JPEG 2000 codestream
  8441. 45    beshort        0xff52
  8442.  
  8443. #------------------------------------------------------------------------------
  8444. # karma:  file(1) magic for Karma data files
  8445. #
  8446. # From <rgooch@atnf.csiro.au>
  8447.  
  8448. 0    string        KarmaRHD Version    Karma Data Structure Version
  8449. >16    belong        x        %lu
  8450.  
  8451. #------------------------------------------------------------------------------
  8452. # kde:  file(1) magic for KDE
  8453.  
  8454. 0        string    [KDE\ Desktop\ Entry]    KDE desktop entry
  8455. !:mime    application/x-kdelnk
  8456. 0        string    #\ KDE\ Config\ File    KDE config file
  8457. !:mime    application/x-kdelnk
  8458. 0        string    #\ xmcd    xmcd database file for kscd
  8459. !:mime    text/x-xmcd
  8460. #------------------------------------------------------------------------------
  8461. # DEC SRC Virtual Paper: Lectern files
  8462. # Karl M. Hegbloom <karlheg@inetarena.com>
  8463. 0    string    lect    DEC SRC Virtual Paper Lectern file
  8464. #------------------------------------------------------------------------------
  8465. # lex:  file(1) magic for lex
  8466. #
  8467. #    derived empirically, your offsets may vary!
  8468. 0    search/100    yyprevious    C program text (from lex)
  8469. >3    search/1    >\0         for %s
  8470. # C program text from GNU flex, from Daniel Quinlan <quinlan@yggdrasil.com>
  8471. 0    search/100    generated\ by\ flex    C program text (from flex)
  8472. # lex description file, from Daniel Quinlan <quinlan@yggdrasil.com>
  8473. 0    search/1    %{        lex description text
  8474.  
  8475. #------------------------------------------------------------------------------
  8476. # lif:  file(1) magic for lif
  8477. #
  8478. # (Daniel Quinlan <quinlan@yggdrasil.com>)
  8479. #
  8480. 0    beshort        0x8000        lif file
  8481. #------------------------------------------------------------------------------
  8482. # linux:  file(1) magic for Linux files
  8483. #
  8484. # Values for Linux/i386 binaries, from Daniel Quinlan <quinlan@yggdrasil.com>
  8485. # The following basic Linux magic is useful for reference, but using
  8486. # "long" magic is a better practice in order to avoid collisions.
  8487. #
  8488. # 2    leshort        100        Linux/i386
  8489. # >0    leshort        0407        impure executable (OMAGIC)
  8490. # >0    leshort        0410        pure executable (NMAGIC)
  8491. # >0    leshort        0413        demand-paged executable (ZMAGIC)
  8492. # >0    leshort        0314        demand-paged executable (QMAGIC)
  8493. #
  8494. 0    lelong        0x00640107    Linux/i386 impure executable (OMAGIC)
  8495. >16    lelong        0        \b, stripped
  8496. 0    lelong        0x00640108    Linux/i386 pure executable (NMAGIC)
  8497. >16    lelong        0        \b, stripped
  8498. 0    lelong        0x0064010b    Linux/i386 demand-paged executable (ZMAGIC)
  8499. >16    lelong        0        \b, stripped
  8500. 0    lelong        0x006400cc    Linux/i386 demand-paged executable (QMAGIC)
  8501. >16    lelong        0        \b, stripped
  8502. #
  8503. 0    string        \007\001\000    Linux/i386 object file
  8504. >20    lelong        >0x1020        \b, DLL library
  8505. # Linux-8086 stuff:
  8506. 0    string        \01\03\020\04    Linux-8086 impure executable
  8507. >28    long        !0        not stripped
  8508. 0    string        \01\03\040\04    Linux-8086 executable
  8509. >28    long        !0        not stripped
  8510. #
  8511. 0    string        \243\206\001\0    Linux-8086 object file
  8512. #
  8513. 0    string        \01\03\020\20    Minix-386 impure executable
  8514. >28    long        !0        not stripped
  8515. 0    string        \01\03\040\20    Minix-386 executable
  8516. >28    long        !0        not stripped
  8517. # core dump file, from Bill Reynolds <bill@goshawk.lanl.gov>
  8518. 216    lelong        0421        Linux/i386 core file
  8519. >220    string        >\0        of '%s'
  8520. >200    lelong        >0        (signal %d)
  8521. #
  8522. # LILO boot/chain loaders, from Daniel Quinlan <quinlan@yggdrasil.com>
  8523. # this can be overridden by the DOS executable (COM) entry
  8524. 2    string        LILO        Linux/i386 LILO boot/chain loader
  8525. #
  8526. # PSF fonts, from H. Peter Anvin <hpa@yggdrasil.com>
  8527. 0    leshort        0x0436        Linux/i386 PC Screen Font data,
  8528. >2    byte        0        256 characters, no directory,
  8529. >2    byte        1        512 characters, no directory,
  8530. >2    byte        2        256 characters, Unicode directory,
  8531. >2    byte        3        512 characters, Unicode directory,
  8532. >3    byte        >0        8x%d
  8533. # Linux swap file, from Daniel Quinlan <quinlan@yggdrasil.com>
  8534. 4086    string        SWAP-SPACE    Linux/i386 swap file
  8535. # From: Jeff Bailey <jbailey@ubuntu.com>
  8536. # Linux swap file with swsusp1 image, from Jeff Bailey <jbailey@ubuntu.com>
  8537. 4076    string        SWAPSPACE2S1SUSPEND    Linux/i386 swap file (new style) with SWSUSP1 image
  8538. # according to man page of mkswap (8) March 1999
  8539. 4086    string        SWAPSPACE2    Linux/i386 swap file (new style)
  8540. >0x400    long        x        %d (4K pages)
  8541. >0x404    long        x        size %d pages
  8542. >>4086    string        SWAPSPACE2    
  8543. >>>1052    string        >\0        Label %s
  8544. # ECOFF magic for OSF/1 and Linux (only tested under Linux though)
  8545. #
  8546. #    from Erik Troan (ewt@redhat.com) examining od dumps, so this
  8547. #        could be wrong
  8548. #      updated by David Mosberger (davidm@azstarnet.com) based on
  8549. #      GNU BFD and MIPS info found below.
  8550. #
  8551. 0    leshort        0x0183        ECOFF alpha
  8552. >24    leshort        0407        executable
  8553. >24    leshort        0410        pure
  8554. >24    leshort        0413        demand paged
  8555. >8    long        >0        not stripped
  8556. >8    long        0        stripped
  8557. >23    leshort        >0        - version %ld.
  8558. #
  8559. # Linux kernel boot images, from Albert Cahalan <acahalan@cs.uml.edu>
  8560. # and others such as Axel Kohlmeyer <akohlmey@rincewind.chemie.uni-ulm.de>
  8561. # and Nicolßs Lichtmaier <nick@debian.org>
  8562. # All known start with: b8 c0 07 8e d8 b8 00 90 8e c0 b9 00 01 29 f6 29
  8563. # Linux kernel boot images (i386 arch) (Wolfram Kleff)
  8564. 514    string        HdrS        Linux kernel
  8565. >510    leshort        0xAA55        x86 boot executable
  8566. >>518    leshort        >=0x200
  8567. >>529    byte        0        zImage,
  8568. >>>529    byte        1        bzImage,
  8569. >>>(526.s+0x200) string    >\0        version %s,
  8570. >>498    leshort        1        RO-rootFS,
  8571. >>498    leshort        0        RW-rootFS,
  8572. >>508    leshort        >0        root_dev 0x%X,
  8573. >>502    leshort        >0        swap_dev 0x%X,
  8574. >>504    leshort        >0        RAMdisksize %u KB,
  8575. >>506    leshort        0xFFFF        Normal VGA
  8576. >>506    leshort        0xFFFE        Extended VGA
  8577. >>506    leshort        0xFFFD        Prompt for Videomode
  8578. >>506    leshort        >0        Video mode %d
  8579. # This also matches new kernels, which were caught above by "HdrS".
  8580. 0        belong    0xb8c0078e    Linux kernel
  8581. >0x1e3        string    Loading        version 1.3.79 or older
  8582. >0x1e9        string    Loading        from prehistoric times
  8583.  
  8584. # System.map files - Nicolßs Lichtmaier <nick@debian.org>
  8585. 8    search/1    \ A\ _text    Linux kernel symbol map text
  8586.  
  8587. # LSM entries - Nicolßs Lichtmaier <nick@debian.org>
  8588. 0    search/1    Begin3    Linux Software Map entry text
  8589. 0    search/1    Begin4    Linux Software Map entry text (new format)
  8590.  
  8591. # From Matt Zimmerman, enhanced for v3 by Matthew Palmer
  8592. 0    belong    0x4f4f4f4d    User-mode Linux COW file
  8593. >4    belong    <3        \b, version %d
  8594. >>8    string    >\0        \b, backing file %s
  8595. >4    belong    >2        \b, version %d
  8596. >>32    string    >\0        \b, backing file %s
  8597.  
  8598. ############################################################################
  8599. # Linux kernel versions
  8600.  
  8601. 0        string        \xb8\xc0\x07\x8e\xd8\xb8\x00\x90    Linux
  8602. >497        leshort        0        x86 boot sector
  8603. >>514        belong        0x8e    of a kernel from the dawn of time!
  8604. >>514        belong        0x908ed8b4    version 0.99-1.1.42
  8605. >>514        belong        0x908ed8b8    for memtest86
  8606.  
  8607. >497        leshort        !0        x86 kernel
  8608. >>504        leshort        >0        RAMdisksize=%u KB
  8609. >>502        leshort        >0        swap=0x%X
  8610. >>508        leshort        >0        root=0x%X
  8611. >>>498        leshort        1        \b-ro
  8612. >>>498        leshort        0        \b-rw
  8613. >>506        leshort        0xFFFF        vga=normal
  8614. >>506        leshort        0xFFFE        vga=extended
  8615. >>506        leshort        0xFFFD        vga=ask
  8616. >>506        leshort        >0        vga=%d
  8617. >>514        belong        0x908ed881    version 1.1.43-1.1.45
  8618. >>514        belong        0x15b281cd
  8619. >>>0xa8e    belong        0x55AA5a5a    version 1.1.46-1.2.13,1.3.0
  8620. >>>0xa99    belong        0x55AA5a5a    version 1.3.1,2
  8621. >>>0xaa3    belong        0x55AA5a5a    version 1.3.3-1.3.30
  8622. >>>0xaa6    belong        0x55AA5a5a    version 1.3.31-1.3.41
  8623. >>>0xb2b    belong        0x55AA5a5a    version 1.3.42-1.3.45
  8624. >>>0xaf7    belong        0x55AA5a5a    version 1.3.46-1.3.72
  8625. >>514        string        HdrS
  8626. >>>518        leshort        >0x1FF
  8627. >>>>529        byte        0        \b, zImage
  8628. >>>>529        byte        1        \b, bzImage
  8629. >>>>(526.s+0x200) string     >\0        \b, version %s
  8630.  
  8631. # Linux boot sector thefts.
  8632. 0        belong        0xb8c0078e    Linux
  8633. >0x1e6        belong        0x454c4b53    ELKS Kernel
  8634. >0x1e6        belong        !0x454c4b53    style boot sector
  8635.  
  8636. ############################################################################
  8637. # Linux 8086 executable
  8638. 0    lelong&0xFF0000FF 0xC30000E9    Linux-Dev86 executable, headerless
  8639. >5    string        .        
  8640. >>4    string        >\0        \b, libc version %s
  8641.  
  8642. 0    lelong&0xFF00FFFF 0x4000301    Linux-8086 executable
  8643. >2    byte&0x01    !0        \b, unmapped zero page
  8644. >2    byte&0x20    0        \b, impure
  8645. >2    byte&0x20    !0
  8646. >>2    byte&0x10    !0        \b, A_EXEC
  8647. >2    byte&0x02    !0        \b, A_PAL
  8648. >2    byte&0x04    !0        \b, A_NSYM
  8649. >2    byte&0x08    !0        \b, A_STAND
  8650. >2    byte&0x40    !0        \b, A_PURE
  8651. >2    byte&0x80    !0        \b, A_TOVLY
  8652. >28     long            !0              \b, not stripped
  8653. >37    string        .        
  8654. >>36    string        >\0        \b, libc version %s
  8655.  
  8656. # 0    lelong&0xFF00FFFF 0x10000301    ld86 I80386 executable
  8657. # 0    lelong&0xFF00FFFF 0xB000301    ld86 M68K executable
  8658. # 0    lelong&0xFF00FFFF 0xC000301    ld86 NS16K executable
  8659. # 0    lelong&0xFF00FFFF 0x17000301    ld86 SPARC executable
  8660.  
  8661. # SYSLINUX boot logo files (from 'ppmtolss16' sources)
  8662. # http://syslinux.zytor.com/
  8663. #
  8664. 0    lelong    =0x1413f33d        SYSLINUX' LSS16 image data
  8665. >4    leshort    x            \b, width %d
  8666. >6    leshort    x            \b, height %d
  8667.  
  8668. 0    string    OOOM            User-Mode-Linux's Copy-On-Write disk image
  8669. >4    belong    x            version %d
  8670.  
  8671. # SE Linux policy database
  8672. # From: Mike Frysinger <vapier@gentoo.org>
  8673. 0    lelong    0xf97cff8c        SE Linux policy
  8674. >16    lelong    x            v%d
  8675. >20    lelong    1            MLS
  8676. >24    lelong    x            %d symbols
  8677. >28    lelong    x            %d ocons
  8678.  
  8679. # Linux Logical Volume Manager (LVM) 
  8680. # Emmanuel VARAGNAT <emmanuel.varagnat@guzu.net>
  8681. #
  8682. # System ID, UUID and volume group name are 128 bytes long
  8683. # but they should never be full and initialized with zeros...
  8684. #
  8685. # LVM1
  8686. #
  8687. 0x0    string    HM\001        LVM1 (Linux Logical Volume Manager), version 1
  8688. >0x12c    string    >\0        , System ID: %s
  8689.  
  8690. 0x0    string    HM\002        LVM1 (Linux Logical Volume Manager), version 2
  8691. >0x12c    string    >\0        , System ID: %s
  8692.  
  8693. #  LVM2
  8694. #
  8695. # It seems that the label header can be in one the four first sector
  8696. # of the disk... (from _find_labeller in lib/label/label.c of LVM2)
  8697. #
  8698. # 0x200 seems to be the common case
  8699.  
  8700. 0x218         string    LVM2\ 001    LVM2 (Linux Logical Volume Manager)
  8701. # read the offset to add to the start of the header, and the header
  8702. # start in 0x200
  8703. >(0x214.l+0x200) string    >\0        , UUID: %s
  8704.  
  8705. 0x018         string    LVM2\ 001    LVM2 (Linux Logical Volume Manager)
  8706. >(0x014.l)     string    >\0        , UUID: %s
  8707.  
  8708. 0x418         string    LVM2\ 001    LVM2 (Linux Logical Volume Manager)
  8709. >(0x414.l+0x400) string    >\0        , UUID: %s
  8710.  
  8711. 0x618         string    LVM2\ 001    LVM2 (Linux Logical Volume Manager)
  8712. >(0x614.l+0x600) string    >\0        , UUID: %s
  8713.  
  8714. # SE Linux policy database
  8715. 0    lelong    0xf97cff8c        SE Linux policy
  8716. >16    lelong    x            v%d
  8717. >20    lelong    1            MLS
  8718. >24    lelong    x            %d symbols
  8719. >28    lelong    x            %d ocons
  8720.  
  8721. # LUKS: Linux Unified Key Setup, On-Disk Format, http://luks.endorphin.org/spec
  8722. # Anthon van der Neut (anthon@mnt.org)
  8723. 0    string    LUKS\xba\xbe    LUKS encrypted file,
  8724. >6    beshort x        ver %d
  8725. >8    string    x        [%s,
  8726. >40    string    x        %s,
  8727. >72    string    x        %s]
  8728. >168    string    x        UUID: %s
  8729.  
  8730. # Type: Xen, the virtual machine monitor
  8731. # From: Radek Vokal <rvokal@redhat.com>
  8732. 0    string        LinuxGuestRecord    Xen saved domain
  8733. #>2    regex        \(name\ [^)]*\)        %s
  8734. >20    search/256    (name            (name
  8735. >>&1    string        x            %s...)
  8736. #------------------------------------------------------------------------------
  8737. # lisp:  file(1) magic for lisp programs
  8738. #
  8739. # various lisp types, from Daniel Quinlan (quinlan@yggdrasil.com)
  8740.  
  8741. # updated by Joerg Jenderek
  8742. # GRR: This lot is too weak
  8743. #0    string    ;;            
  8744. # windows INF files often begin with semicolon and use CRLF as line end
  8745. # lisp files are mainly created on unix system with LF as line end
  8746. #>2    search/2048    !\r        Lisp/Scheme program text
  8747. #>2    search/2048    \r        Windows INF file
  8748.  
  8749. 0    search/256    (if\             Lisp/Scheme program text
  8750. 0    search/256    (setq\             Lisp/Scheme program text
  8751. 0    search/256    (defvar\         Lisp/Scheme program text
  8752. 0    search/256    (defparam\         Lisp/Scheme program text
  8753. 0    search/256    (defun\          Lisp/Scheme program text
  8754. 0    search/256    (autoload\         Lisp/Scheme program text
  8755. 0    search/256    (custom-set-variables\     Lisp/Scheme program text
  8756.  
  8757. # Emacs 18 - this is always correct, but not very magical.
  8758. 0    string    \012(            Emacs v18 byte-compiled Lisp data
  8759. !:mime    application/x-elc
  8760. # Emacs 19+ - ver. recognition added by Ian Springer
  8761. # Also applies to XEmacs 19+ .elc files; could tell them apart with regexs
  8762. # - Chris Chittleborough <cchittleborough@yahoo.com.au>
  8763. 0    string    ;ELC    
  8764. >4    byte    >18            
  8765. >4    byte    <32            Emacs/XEmacs v%d byte-compiled Lisp data
  8766. !:mime    application/x-elc        
  8767.  
  8768. # Files produced by CLISP Common Lisp From: Bruno Haible <haible@ilog.fr>
  8769. 0    string    (SYSTEM::VERSION\040'    CLISP byte-compiled Lisp program
  8770. 0    long    0x70768BD2        CLISP memory image data
  8771. 0    long    0xD28B7670        CLISP memory image data, other endian
  8772.  
  8773. # Files produced by GNU gettext
  8774. 0    long    0xDE120495        GNU-format message catalog data
  8775. 0    long    0x950412DE        GNU-format message catalog data
  8776.  
  8777. #.com and .bin for MIT scheme 
  8778. 0    string    \372\372\372\372    MIT scheme (library?)
  8779.  
  8780. # From: David Allouche <david@allouche.net>
  8781. 0    search/1    \<TeXmacs|    TeXmacs document text
  8782. !:mime    text/texmacs
  8783.  
  8784. #------------------------------------------------------------------------------
  8785. # llvm:  file(1) magic for LLVM byte-codes
  8786. # URL:  http://llvm.cs.uiuc.edu/docs/BytecodeFormat.html#signature
  8787. # From: Al Stone <ahs3@fc.hp.com>
  8788.  
  8789. 0    string    llvm    LLVM byte-codes, uncompressed
  8790. 0    string    llvc0    LLVM byte-codes, null compression
  8791. 0    string    llvc1    LLVM byte-codes, gzip compression
  8792. 0    string    llvc2    LLVM byte-codes, bzip2 compression
  8793. #------------------------------------------------------------------------------
  8794. # lua:  file(1) magic for Lua scripting language
  8795. # URL:  http://www.lua.org/
  8796. # From: Reuben Thomas <rrt@sc3d.org>, Seo Sanghyeon <tinuviel@sparcs.kaist.ac.kr>
  8797.  
  8798. # Lua scripts
  8799. 0    search/1/b    #!\ /usr/bin/lua    Lua script text executable
  8800. 0    search/1/b    #!\ /usr/local/bin/lua    Lua script text executable
  8801. 0    search/1    #!/usr/bin/env\ lua    Lua script text executable
  8802. 0    search/1    #!\ /usr/bin/env\ lua    Lua script text executable
  8803.  
  8804. # Lua bytecode
  8805. 0    string        \033Lua            Lua bytecode,
  8806. >4    byte        0x50            version 5.0
  8807. >4    byte        0x51            version 5.1
  8808.  
  8809. #------------------------------------------------------------------------------
  8810. # luks:  file(1) magic for Linux Unified Key Setup
  8811. # URL:    http://luks.endorphin.org/spec
  8812. # From:    Anthon van der Neut <anthon@mnt.org>
  8813.  
  8814. 0    string        LUKS\xba\xbe    LUKS encrypted file,
  8815. >6    beshort        x        ver %d
  8816. >8    string        x        [%s,
  8817. >40    string        x        %s,
  8818. >72    string        x        %s]
  8819. >168    string        x        UUID: %s
  8820. #------------------------------------------------------------
  8821. # Mach has two magic numbers, 0xcafebabe and 0xfeedface.
  8822. # Unfortunately the first, cafebabe, is shared with
  8823. # Java ByteCode, so they are both handled in the file "cafebabe".
  8824. # The "feedface" ones are handled herein.
  8825. #------------------------------------------------------------
  8826. 0    lelong&0xfeffffff    0xfeedface    Mach-O
  8827. >0    byte        0xcf        64-bit
  8828. >12    lelong        1        object
  8829. >12    lelong        2        executable
  8830. >12    lelong        3        fixed virtual memory shared library
  8831. >12    lelong        4        core
  8832. >12    lelong        5        preload executable
  8833. >12    lelong        6        dynamically linked shared library
  8834. >12    lelong        7        dynamic linker
  8835. >12    lelong        8        bundle
  8836. >12    lelong        9        dynamically linked shared library stub
  8837. >12    lelong        >9
  8838. >>12    lelong        x        filetype=%ld
  8839. >4    lelong        <0
  8840. >>4    lelong        x        architecture=%ld
  8841. >4    lelong        1        vax
  8842. >4    lelong        2        romp
  8843. >4    lelong        3        architecture=3
  8844. >4    lelong        4        ns32032
  8845. >4    lelong        5        ns32332
  8846. >4    lelong        6        m68k
  8847. >4    lelong        7        i386
  8848. >4    lelong        8        mips
  8849. >4    lelong        9        ns32532
  8850. >4    lelong        10        architecture=10
  8851. >4    lelong        11        hppa
  8852. >4    lelong        12        acorn
  8853. >4    lelong        13        m88k
  8854. >4    lelong        14        sparc
  8855. >4    lelong        15        i860-big
  8856. >4    lelong        16        i860
  8857. >4    lelong        17        rs6000
  8858. >4    lelong        18        ppc
  8859. >4    lelong        16777234    ppc64
  8860. >4    lelong        >16777234
  8861. >>4    lelong        x        architecture=%ld
  8862. #
  8863. 0    belong&0xfffffffe    0xfeedface    Mach-O
  8864. >3    byte        0xcf        64-bit
  8865. >12    belong        1        object
  8866. >12    belong        2        executable
  8867. >12    belong        3        fixed virtual memory shared library
  8868. >12    belong        4        core
  8869. >12    belong        5        preload executable
  8870. >12    belong        6               dynamically linked shared library
  8871. >12    belong        7               dynamic linker
  8872. >12    belong        8        bundle
  8873. >12    belong        9        dynamically linked shared library stub
  8874. >12    belong        >9
  8875. >>12    belong        x        filetype=%ld
  8876. >4    belong        <0
  8877. >>4    belong        x        architecture=%ld
  8878. >4    belong        1        vax
  8879. >4    belong        2        romp
  8880. >4    belong        3        architecture=3
  8881. >4    belong        4        ns32032
  8882. >4    belong        5        ns32332
  8883. >4    belong        6        for m68k architecture
  8884. # from NeXTstep 3.0 <mach/machine.h>
  8885. # i.e. mc680x0_all, ignore
  8886. # >>8    belong        1        (mc68030)
  8887. >>8    belong        2        (mc68040)
  8888. >>8    belong        3        (mc68030 only)
  8889. >4    belong        7        i386
  8890. >4    belong        8        mips
  8891. >4    belong        9        ns32532
  8892. >4    belong        10        architecture=10
  8893. >4    belong        11        hppa
  8894. >4    belong        12        acorn
  8895. >4    belong        13        m88k
  8896. >4    belong        14        sparc
  8897. >4    belong        15        i860-big
  8898. >4    belong        16        i860
  8899. >4    belong        17        rs6000
  8900. >4    belong        18        ppc
  8901. >4    belong        16777234    ppc64
  8902. >4    belong        >16777234
  8903. >>4    belong        x        architecture=%ld
  8904.  
  8905. #------------------------------------------------------------------------------
  8906. # macintosh description
  8907. #
  8908. # BinHex is the Macintosh ASCII-encoded file format (see also "apple")
  8909. # Daniel Quinlan, quinlan@yggdrasil.com
  8910. 11    string    must\ be\ converted\ with\ BinHex    BinHex binary text
  8911. !:mime    application/mac-binhex40
  8912. >41    string    x                    \b, version %.3s
  8913.  
  8914. # Stuffit archives are the de facto standard of compression for Macintosh
  8915. # files obtained from most archives. (franklsm@tuns.ca)
  8916. 0    string        SIT!            StuffIt Archive (data)
  8917. >2    string        x            : %s
  8918. 0    string        SITD            StuffIt Deluxe (data)
  8919. >2    string        x            : %s
  8920. 0    string        Seg            StuffIt Deluxe Segment (data)
  8921. >2    string        x            : %s
  8922.  
  8923. # Newer StuffIt archives (grant@netbsd.org)
  8924. 0    string        StuffIt            StuffIt Archive
  8925. !:mime    application/x-stuffit
  8926. #>162    string        >0            : %s
  8927.  
  8928. # Macintosh Applications and Installation binaries (franklsm@tuns.ca)
  8929. # GRR: Too weak
  8930. #0    string        APPL            Macintosh Application (data)
  8931. #>2    string        x            \b: %s
  8932.  
  8933. # Macintosh System files (franklsm@tuns.ca)
  8934. # GRR: Too weak
  8935. #0    string        zsys            Macintosh System File (data)
  8936. #0    string        FNDR            Macintosh Finder (data)
  8937. #0    string        libr            Macintosh Library (data)
  8938. #>2    string        x            : %s
  8939. #0    string        shlb            Macintosh Shared Library (data)
  8940. #>2    string        x            : %s
  8941. #0    string        cdev            Macintosh Control Panel (data)
  8942. #>2    string        x            : %s
  8943. #0    string        INIT            Macintosh Extension (data)
  8944. #>2    string        x            : %s
  8945. #0    string        FFIL            Macintosh Truetype Font (data)
  8946. #>2    string        x            : %s
  8947. #0    string        LWFN            Macintosh Postscript Font (data)
  8948. #>2    string        x            : %s
  8949.  
  8950. # Additional Macintosh Files (franklsm@tuns.ca)
  8951. # GRR: Too weak
  8952. #0    string        PACT            Macintosh Compact Pro Archive (data)
  8953. #>2    string        x            : %s
  8954. #0    string        ttro            Macintosh TeachText File (data)
  8955. #>2    string        x            : %s
  8956. #0    string        TEXT            Macintosh TeachText File (data)
  8957. #>2    string        x            : %s
  8958. #0    string        PDF            Macintosh PDF File (data)
  8959. #>2    string        x            : %s
  8960.  
  8961. # MacBinary format (Eric Fischer, enf@pobox.com)
  8962. #
  8963. # Unfortunately MacBinary doesn't really have a magic number prior
  8964. # to the MacBinary III format.  The checksum is really the way to
  8965. # do it, but the magic file format isn't up to the challenge.
  8966. #
  8967. # 0    byte        0
  8968. # 1    byte                # filename length
  8969. # 2    string                # filename
  8970. # 65    string                # file type
  8971. # 69    string                # file creator
  8972. # 73    byte                # Finder flags
  8973. # 74    byte        0
  8974. # 75    beshort                # vertical posn in window
  8975. # 77    beshort                # horiz posn in window
  8976. # 79    beshort                # window or folder ID
  8977. # 81    byte                # protected?
  8978. # 82    byte        0
  8979. # 83    belong                # length of data segment
  8980. # 87    belong                # length of resource segment
  8981. # 91    belong                # file creation date
  8982. # 95    belong                # file modification date
  8983. # 99    beshort                # length of comment after resource
  8984. # 101    byte                # new Finder flags
  8985. # 102    string        mBIN        # (only in MacBinary III)
  8986. # 106    byte                # char. code of file name
  8987. # 107    byte                # still more Finder flags
  8988. # 116    belong                # total file length
  8989. # 120    beshort                # length of add'l header
  8990. # 122    byte        129        # for MacBinary II
  8991. # 122    byte        130        # for MacBinary III
  8992. # 123    byte        129        # minimum version that can read fmt
  8993. # 124    beshort                # checksum
  8994. #
  8995. # This attempts to use the version numbers as a magic number, requiring
  8996. # that the first one be 0x80, 0x81, 0x82, or 0x83, and that the second
  8997. # be 0x81.  This works for the files I have, but maybe not for everyone's.
  8998.  
  8999. # Unfortunately, this magic is quite weak - MPi
  9000. #122    beshort&0xFCFF    0x8081        Macintosh MacBinary data
  9001.  
  9002. # MacBinary I doesn't have the version number field at all, but MacBinary II
  9003. # has been in use since 1987 so I hope there aren't many really old files
  9004. # floating around that this will miss.  The original spec calls for using
  9005. # the nulls in 0, 74, and 82 as the magic number.
  9006. #
  9007. # Another possibility, that would also work for MacBinary I, is to use
  9008. # the assumption that 65-72 will all be ASCII (0x20-0x7F), that 73 will
  9009. # have bits 1 (changed), 2 (busy), 3 (bozo), and 6 (invisible) unset,
  9010. # and that 74 will be 0.  So something like
  9011. # 71     belong&0x80804EFF 0x00000000     Macintosh MacBinary data
  9012. # >73    byte&0x01    0x01        \b, inited
  9013. # >73    byte&0x02    0x02        \b, changed
  9014. # >73    byte&0x04    0x04        \b, busy
  9015. # >73    byte&0x08    0x08        \b, bozo
  9016. # >73    byte&0x10    0x10        \b, system
  9017. # >73    byte&0x10    0x20        \b, bundle
  9018. # >73    byte&0x10    0x40        \b, invisible
  9019. # >73    byte&0x10    0x80        \b, locked
  9020.  
  9021. #>65    string        x        \b, type "%4.4s"
  9022.  
  9023. #>65    string        8BIM        (PhotoShop)
  9024. #>65    string        ALB3        (PageMaker 3)
  9025. #>65    string        ALB4        (PageMaker 4)
  9026. #>65    string        ALT3        (PageMaker 3)
  9027. #>65    string        APPL        (application)
  9028. #>65    string        AWWP        (AppleWorks word processor)
  9029. #>65    string        CIRC        (simulated circuit)
  9030. #>65    string        DRWG        (MacDraw)
  9031. #>65    string        EPSF        (Encapsulated PostScript)
  9032. #>65    string        FFIL        (font suitcase)
  9033. #>65    string        FKEY        (function key)
  9034. #>65    string        FNDR        (Macintosh Finder)
  9035. #>65    string        GIFf        (GIF image)
  9036. #>65    string        Gzip        (GNU gzip)
  9037. #>65    string        INIT        (system extension)
  9038. #>65    string        LIB\         (library)
  9039. #>65    string        LWFN        (PostScript font)
  9040. #>65    string        MSBC        (Microsoft BASIC)
  9041. #>65    string        PACT        (Compact Pro archive)
  9042. #>65    string        PDF\         (Portable Document Format)
  9043. #>65    string        PICT        (picture)
  9044. #>65    string        PNTG        (MacPaint picture)
  9045. #>65    string        PREF        (preferences)
  9046. #>65    string        PROJ        (Think C project)
  9047. #>65    string        QPRJ        (Think Pascal project)
  9048. #>65    string        SCFL        (Defender scores)
  9049. #>65    string        SCRN        (startup screen)
  9050. #>65    string        SITD        (StuffIt Deluxe)
  9051. #>65    string        SPn3        (SuperPaint)
  9052. #>65    string        STAK        (HyperCard stack)
  9053. #>65    string        Seg\         (StuffIt segment)
  9054. #>65    string        TARF        (Unix tar archive)
  9055. #>65    string        TEXT        (ASCII)
  9056. #>65    string        TIFF        (TIFF image)
  9057. #>65    string        TOVF        (Eudora table of contents)
  9058. #>65    string        WDBN        (Microsoft Word word processor)
  9059. #>65    string        WORD        (MacWrite word processor)
  9060. #>65    string        XLS\         (Microsoft Excel)
  9061. #>65    string        ZIVM        (compress (.Z))
  9062. #>65    string        ZSYS        (Pre-System 7 system file)
  9063. #>65    string        acf3        (Aldus FreeHand)
  9064. #>65    string        cdev        (control panel)
  9065. #>65    string        dfil        (Desk Acessory suitcase)
  9066. #>65    string        libr        (library)
  9067. #>65    string        nX^d        (WriteNow word processor)
  9068. #>65    string        nX^w        (WriteNow dictionary)
  9069. #>65    string        rsrc        (resource)
  9070. #>65    string        scbk        (Scrapbook)
  9071. #>65    string        shlb        (shared library)
  9072. #>65    string        ttro        (SimpleText read-only)
  9073. #>65    string        zsys        (system file)
  9074.  
  9075. #>69    string        x        \b, creator "%4.4s"
  9076.  
  9077. # Somewhere, Apple has a repository of registered Creator IDs.  These are
  9078. # just the ones that I happened to have files from and was able to identify.
  9079.  
  9080. #>69    string        8BIM        (Adobe Photoshop)
  9081. #>69    string        ALD3        (PageMaker 3)
  9082. #>69    string        ALD4        (PageMaker 4)
  9083. #>69    string        ALFA        (Alpha editor)
  9084. #>69    string        APLS        (Apple Scanner)
  9085. #>69    string        APSC        (Apple Scanner)
  9086. #>69    string        BRKL        (Brickles)
  9087. #>69    string        BTFT        (BitFont)
  9088. #>69    string        CCL2         (Common Lisp 2)
  9089. #>69    string        CCL\         (Common Lisp)
  9090. #>69    string        CDmo        (The Talking Moose)
  9091. #>69    string        CPCT        (Compact Pro)
  9092. #>69    string        CSOm        (Eudora)
  9093. #>69    string        DMOV        (Font/DA Mover)
  9094. #>69    string        DSIM        (DigSim)
  9095. #>69    string        EDIT        (Macintosh Edit)
  9096. #>69    string        ERIK        (Macintosh Finder)
  9097. #>69    string        EXTR        (self-extracting archive)
  9098. #>69    string        Gzip        (GNU gzip)
  9099. #>69    string        KAHL        (Think C)
  9100. #>69    string        LWFU        (LaserWriter Utility)
  9101. #>69    string        LZIV        (compress)
  9102. #>69    string        MACA        (MacWrite)
  9103. #>69    string        MACS        (Macintosh operating system)
  9104. #>69    string        MAcK        (MacKnowledge terminal emulator)
  9105. #>69    string        MLND        (Defender)
  9106. #>69    string        MPNT        (MacPaint)
  9107. #>69    string        MSBB        (Microsoft BASIC (binary))
  9108. #>69    string        MSWD        (Microsoft Word)
  9109. #>69    string        NCSA        (NCSA Telnet)
  9110. #>69    string        PJMM        (Think Pascal)
  9111. #>69    string        PSAL        (Hunt the Wumpus)
  9112. #>69    string        PSI2        (Apple File Exchange)
  9113. #>69    string        R*ch        (BBEdit)
  9114. #>69    string        RMKR        (Resource Maker)
  9115. #>69    string        RSED        (Resource Editor)
  9116. #>69    string        Rich        (BBEdit)
  9117. #>69    string        SIT!        (StuffIt)
  9118. #>69    string        SPNT        (SuperPaint)
  9119. #>69    string        Unix        (NeXT Mac filesystem)
  9120. #>69    string        VIM!        (Vim editor)
  9121. #>69    string        WILD        (HyperCard)
  9122. #>69    string        XCEL        (Microsoft Excel)
  9123. #>69    string        aCa2        (Fontographer)
  9124. #>69    string        aca3        (Aldus FreeHand)
  9125. #>69    string        dosa        (Macintosh MS-DOS file system)
  9126. #>69    string        movr        (Font/DA Mover)
  9127. #>69    string        nX^n        (WriteNow)
  9128. #>69    string        pdos        (Apple ProDOS file system)
  9129. #>69    string        scbk        (Scrapbook)
  9130. #>69    string        ttxt        (SimpleText)
  9131. #>69    string        ufox        (Foreign File Access)
  9132.  
  9133. # Just in case...
  9134.  
  9135. 102    string        mBIN        MacBinary III data with surprising version number
  9136.  
  9137. # sas magic from Bruce Foster (bef@nwu.edu)
  9138. #
  9139. #0    string        SAS        SAS
  9140. #>8    string        x        %s
  9141. 0    string        SAS        SAS
  9142. >24    string        DATA        data file
  9143. >24    string        CATALOG        catalog
  9144. >24    string        INDEX        data file index
  9145. >24    string        VIEW        data view
  9146. # sas 7+ magic from Reinhold Koch (reinhold.koch@roche.com)
  9147. #
  9148. 0x54    string          SAS             SAS 7+
  9149. >0x9C   string          DATA            data file
  9150. >0x9C   string          CATALOG         catalog
  9151. >0x9C   string          INDEX           data file index
  9152. >0x9C   string          VIEW            data view
  9153.  
  9154. # spss magic for SPSS system and portable files, 
  9155. #     from Bruce Foster (bef@nwu.edu).
  9156.  
  9157. 0    long        0xc1e2c3c9    SPSS Portable File
  9158. >40    string         x        %s
  9159.  
  9160. 0    string        $FL2        SPSS System File
  9161. >24    string        x        %s
  9162.  
  9163. # Macintosh filesystem data
  9164. # From "Tom N Harris" <telliamed@mac.com>
  9165. # Fixed HFS+ and Partition map magic: Ethan Benson <erbenson@alaska.net>
  9166. # The MacOS epoch begins on 1 Jan 1904 instead of 1 Jan 1970, so these
  9167. # entries depend on the data arithmetic added after v.35
  9168. # There's also some Pascal strings in here, ditto...
  9169.  
  9170. # The boot block signature, according to IM:Files, is 
  9171. # "for HFS volumes, this field always contains the value 0x4C4B."
  9172. # But if this is true for MFS or HFS+ volumes, I don't know.
  9173. # Alternatively, the boot block is supposed to be zeroed if it's
  9174. # unused, so a simply >0 should suffice.
  9175.  
  9176. 0x400    beshort            0xD2D7        Macintosh MFS data
  9177. >0    beshort            0x4C4B        (bootable)
  9178. >0x40a    beshort            &0x8000        (locked)
  9179. >0x402    beldate-0x7C25B080    x        created: %s,
  9180. >0x406    beldate-0x7C25B080    >0        last backup: %s,
  9181. >0x414    belong            x        block size: %d,
  9182. >0x412    beshort            x        number of blocks: %d,
  9183. >0x424    pstring            x        volume name: %s
  9184.  
  9185. # "BD" is has many false positives
  9186. #0x400    beshort            0x4244        Macintosh HFS data
  9187. #>0    beshort            0x4C4B        (bootable)
  9188. #>0x40a    beshort            &0x8000        (locked)
  9189. #>0x40a    beshort            ^0x0100        (mounted)
  9190. #>0x40a    beshort            &0x0200        (spared blocks)
  9191. #>0x40a    beshort            &0x0800        (unclean)
  9192. #>0x47C    beshort            0x482B        (Embedded HFS+ Volume)
  9193. #>0x402    beldate-0x7C25B080    x        created: %s,
  9194. #>0x406    beldate-0x7C25B080    x        last modified: %s,
  9195. #>0x440    beldate-0x7C25B080    >0        last backup: %s,
  9196. #>0x414    belong            x        block size: %d,
  9197. #>0x412    beshort            x        number of blocks: %d,
  9198. #>0x424    pstring            x        volume name: %s
  9199.  
  9200. 0x400    beshort            0x482B        Macintosh HFS Extended
  9201. >&0    beshort            x        version %d data
  9202. >0    beshort            0x4C4B        (bootable)
  9203. >0x404    belong            ^0x00000100    (mounted)
  9204. >&2    belong            &0x00000200    (spared blocks)
  9205. >&2    belong            &0x00000800    (unclean)
  9206. >&2    belong            &0x00008000    (locked)
  9207. >&6    string            x        last mounted by: '%.4s',
  9208. # really, that should be treated as a belong and we print a string
  9209. # based on the value. TN1150 only mentions '8.10' for "MacOS 8.1"
  9210. >&14    beldate-0x7C25B080    x        created: %s,
  9211. # only the creation date is local time, all other timestamps in HFS+ are UTC.
  9212. >&18    bedate-0x7C25B080    x        last modified: %s,
  9213. >&22    bedate-0x7C25B080    >0        last backup: %s,
  9214. >&26    bedate-0x7C25B080    >0        last checked: %s,
  9215. >&38    belong            x        block size: %d,
  9216. >&42    belong            x        number of blocks: %d,
  9217. >&46    belong            x        free blocks: %d
  9218.  
  9219. # I don't think this is really necessary since it doesn't do much and 
  9220. # anything with a valid driver descriptor will also have a valid
  9221. # partition map
  9222. #0        beshort        0x4552        Apple Device Driver data
  9223. #>&24        beshort        =1        \b, MacOS
  9224.  
  9225. # Is that the partition type a cstring or a pstring? Well, IM says "strings 
  9226. # shorter than 32 bytes must be terminated with NULL" so I'll treat it as a 
  9227. # cstring. Of course, partitions can contain more than four entries, but 
  9228. # what're you gonna do?
  9229. # GRR: This magic is too weak, it is just "PM"
  9230. #0x200        beshort        0x504D        Apple Partition data
  9231. #>0x2        beshort        x        (block size: %d):
  9232. #>0x230        string        x        first type: %s,
  9233. #>0x210        string        x        name: %s,
  9234. #>0x254        belong        x        number of blocks: %d,
  9235. #>0x400        beshort        0x504D        
  9236. #>>0x430        string        x        second type: %s,
  9237. #>>0x410        string        x        name: %s,
  9238. #>>0x454        belong        x        number of blocks: %d,
  9239. #>>0x600        beshort        0x504D
  9240. #>>>0x630    string        x        third type: %s,
  9241. #>>>0x610    string        x        name: %s,
  9242. #>>>0x654    belong        x        number of blocks: %d,
  9243. #>>0x800        beshort        0x504D        
  9244. #>>>0x830    string        x        fourth type: %s,
  9245. #>>>0x810    string        x        name: %s,
  9246. #>>>0x854    belong        x        number of blocks: %d,
  9247. #>>>0xa00    beshort        0x504D        
  9248. #>>>>0xa30    string        x        fifth type: %s,
  9249. #>>>>0xa10    string        x        name: %s,
  9250. #>>>>0xa54    belong        x        number of blocks: %d
  9251. #>>>0xc00    beshort        0x504D
  9252. #>>>>0xc30    string        x        sixth type: %s,
  9253. #>>>>0xc10    string        x        name: %s,
  9254. #>>>>0xc54    belong        x        number of blocks: %d
  9255. ## AFAIK, only the signature is different
  9256. #0x200        beshort        0x5453        Apple Old Partition data
  9257. #>0x2        beshort        x        block size: %d,
  9258. #>0x230        string        x        first type: %s,
  9259. #>0x210        string        x        name: %s,
  9260. #>0x254        belong        x        number of blocks: %d,
  9261. #>0x400        beshort        0x504D        
  9262. #>>0x430        string        x        second type: %s,
  9263. #>>0x410        string        x        name: %s,
  9264. #>>0x454        belong        x        number of blocks: %d,
  9265. #>>0x800        beshort        0x504D        
  9266. #>>>0x830    string        x        third type: %s,
  9267. #>>>0x810    string        x        name: %s,
  9268. #>>>0x854    belong        x        number of blocks: %d,
  9269. #>>>0xa00    beshort        0x504D        
  9270. #>>>>0xa30    string        x        fourth type: %s,
  9271. #>>>>0xa10    string        x        name: %s,
  9272. #>>>>0xa54    belong        x        number of blocks: %d
  9273.  
  9274. # From: Remi Mommsen <mommsen@slac.stanford.edu>
  9275. 0        string        BOMStore    Mac OS X bill of materials (BOM) file
  9276.  
  9277. #------------------------------------------------------------------------------
  9278. # magic:  file(1) magic for magic files
  9279. #
  9280. 0    string        #\ Magic    magic text file for file(1) cmd
  9281. 0    lelong        0xF11E041C    magic binary file for file(1) cmd
  9282. >4    lelong        x        (version %d) (little endian)
  9283. 0    belong        0xF11E041C    magic binary file for file(1) cmd
  9284. >4    belong        x        (version %d) (big endian)
  9285. #------------------------------------------------------------------------------
  9286. # mail.news:  file(1) magic for mail and news
  9287. #
  9288. # Unfortunately, saved netnews also has From line added in some news software.
  9289. #0    string        From         mail text
  9290. # There are tests to ascmagic.c to cope with mail and news.
  9291. 0    string        Relay-Version:     old news text
  9292. !:mime    message/rfc822
  9293. 0    string        #!\ rnews    batched news text
  9294. !:mime    message/rfc822
  9295. 0    string        N#!\ rnews    mailed, batched news text
  9296. !:mime    message/rfc822
  9297. 0    string        Forward\ to     mail forwarding text
  9298. !:mime    message/rfc822
  9299. 0    string        Pipe\ to     mail piping text
  9300. !:mime    message/rfc822
  9301. 0    string        Return-Path:    smtp mail text
  9302. !:mime    message/rfc822
  9303. 0    string        Path:        news text
  9304. !:mime    message/news
  9305. 0    string        Xref:        news text
  9306. !:mime    message/news
  9307. 0    string        From:        news or mail text
  9308. !:mime    message/rfc822
  9309. 0    string        Article     saved news text
  9310. !:mime    message/news
  9311. 0    string        BABYL        Emacs RMAIL text
  9312. 0    string        Received:    RFC 822 mail text
  9313. !:mime    message/rfc822
  9314. 0    string        MIME-Version:    MIME entity text
  9315. #0    string        Content-    MIME entity text
  9316.  
  9317. # TNEF files...
  9318. 0    lelong        0x223E9F78    Transport Neutral Encapsulation Format
  9319.  
  9320. # From: Kevin Sullivan <ksulliva@psc.edu>
  9321. 0    string        *mbx*        MBX mail folder
  9322.  
  9323. # From: Simon Matter <simon.matter@invoca.ch>
  9324. 0    string        \241\002\213\015skiplist\ file\0\0\0    Cyrus skiplist DB
  9325.  
  9326. # JAM(mbp) Fidonet message area databases
  9327. # JHR file
  9328. 0    string    JAM\0            JAM message area header file
  9329. >12    leshort >0            (%d messages)
  9330.  
  9331. # Squish Fidonet message area databases
  9332. # SQD file (requires at least one message in the area)
  9333. # XXX: Weak magic
  9334. #256    leshort    0xAFAE4453        Squish message area data file
  9335. #>4    leshort    >0            (%d messages)
  9336.  
  9337. #0    string        \<!--\ MHonArc        text/html; x-type=mhonarc
  9338.  
  9339. #------------------------------------------------------------------------------
  9340. # maple:  file(1) magic for maple files
  9341. # "H. Nanosecond" <aldomel@ix.netcom.com>
  9342. # Maple V release 4, a multi-purpose math program
  9343. #
  9344.  
  9345. # maple library .lib
  9346. 0    string    \000MVR4\nI    MapleVr4 library
  9347.  
  9348. # .ind
  9349. # no magic for these :-(
  9350. # they are compiled indexes for maple files
  9351.  
  9352. # .hdb 
  9353. 0    string    \000\004\000\000    Maple help database
  9354.  
  9355. # .mhp
  9356. # this has the form <PACKAGE=name>
  9357. 0    string    \<PACKAGE=    Maple help file
  9358. 0    string    \<HELP\ NAME=    Maple help file
  9359. 0    string    \n\<HELP\ NAME=    Maple help file with extra carriage return at start (yuck)
  9360. #0    string    #\ Newton    Maple help file, old style
  9361. 0    string    #\ daub    Maple help file, old style
  9362. #0    string    #===========    Maple help file, old style
  9363.  
  9364. # .mws
  9365. 0    string    \000\000\001\044\000\221    Maple worksheet
  9366. #this is anomalous
  9367. 0    string    WriteNow\000\002\000\001\000\000\000\000\100\000\000\000\000\000    Maple worksheet, but weird
  9368. # this has the form {VERSION 2 3 "IBM INTEL NT" "2.3" }\n
  9369. # that is {VERSION major_version miunor_version computer_type version_string}
  9370. 0    string    {VERSION\     Maple worksheet
  9371. >9    string    >\0    version %.1s.
  9372. >>>11    string    >\0    %.1s
  9373.  
  9374. # .mps
  9375. 0    string    \0\0\001$    Maple something
  9376. # from byte 4 it is either 'nul E' or 'soh R'
  9377. # I think 'nul E' means a file that was saved as  a different name
  9378. # a sort of revision marking
  9379. # 'soh R' means new 
  9380. >4    string    \000\105    An old revision
  9381. >4    string    \001\122    The latest save
  9382.  
  9383. # .mpl
  9384. # some of these are the same as .mps above
  9385. #0000000 000 000 001 044 000 105 same as .mps
  9386. #0000000 000 000 001 044 001 122 same as .mps
  9387.  
  9388. 0    string    #\n##\ <SHAREFILE=    Maple something
  9389. 0    string    \n#\n##\ <SHAREFILE=    Maple something
  9390. 0    string    ##\ <SHAREFILE=    Maple something
  9391. 0    string    #\r##\ <SHAREFILE=    Maple something
  9392. 0    string    \r#\r##\ <SHAREFILE=    Maple something
  9393. 0    string    #\ \r##\ <DESCRIBE>    Maple something anomalous.
  9394.  
  9395. #------------------------------------------------------------------------------
  9396. # mathcad:  file(1) magic for Mathcad documents
  9397. # URL:    http://www.mathsoft.com/
  9398. # From:    Josh Triplett <josh@freedesktop.org>
  9399.  
  9400. 0    string    .MCAD\t        Mathcad document
  9401. #------------------------------------------------------------------------------
  9402. # mathematica:  file(1) magic for mathematica files
  9403. # "H. Nanosecond" <aldomel@ix.netcom.com>
  9404. # Mathematica a multi-purpose math program
  9405. # versions 2.2 and 3.0
  9406.  
  9407. #mathematica .mb
  9408. 0    string    \064\024\012\000\035\000\000\000    Mathematica version 2 notebook
  9409. 0    string    \064\024\011\000\035\000\000\000    Mathematica version 2 notebook
  9410.  
  9411. # .ma
  9412. # multiple possibilites:
  9413.  
  9414. 0    string    (*^\n\n::[\011frontEndVersion\ =\     Mathematica notebook
  9415. #>41    string    >\0    %s
  9416.  
  9417. #0    string    (*^\n\n::[\011palette    Mathematica notebook version 2.x
  9418.  
  9419. #0    string    (*^\n\n::[\011Information    Mathematica notebook version 2.x
  9420. #>675    string    >\0    %s #doesn't work well
  9421.  
  9422. # there may be 'cr' instread of 'nl' in some does this matter?
  9423.  
  9424. # generic:
  9425. 0    string    (*^\r\r::[\011    Mathematica notebook version 2.x
  9426. 0    string    (*^\r\n\r\n::[\011    Mathematica notebook version 2.x
  9427. 0    string    (*^\015            Mathematica notebook version 2.x
  9428. 0    string    (*^\n\r\n\r::[\011    Mathematica notebook version 2.x
  9429. 0    string    (*^\r::[\011    Mathematica notebook version 2.x
  9430. 0    string    (*^\r\n::[\011    Mathematica notebook version 2.x
  9431. 0    string    (*^\n\n::[\011    Mathematica notebook version 2.x
  9432. 0    string    (*^\n::[\011    Mathematica notebook version 2.x
  9433.  
  9434.  
  9435. # Mathematica .mx files
  9436.  
  9437. #0    string    (*This\ is\ a\ Mathematica\ binary\ dump\ file.\ It\ can\ be\ loaded\ with\ Get.*)    Mathematica binary file
  9438. 0    string    (*This\ is\ a\ Mathematica\ binary\     Mathematica binary file
  9439. #>71    string \000\010\010\010\010\000\000\000\000\000\000\010\100\010\000\000\000    
  9440. # >71... is optional
  9441. >88    string    >\0    from %s
  9442.  
  9443.  
  9444. # Mathematica files PBF:
  9445. # 115 115 101 120 102 106 000 001 000 000 000 203 000 001 000
  9446. 0    string    MMAPBF\000\001\000\000\000\203\000\001\000    Mathematica PBF (fonts I think)
  9447.  
  9448. # .ml files  These are menu resources I think
  9449. # these start with "[0-9][0-9][0-9]\ A~[0-9][0-9][0-9]\ 
  9450. # how to put that into a magic rule?
  9451. 4    string    \ A~    MAthematica .ml file
  9452.  
  9453. # .nb files
  9454. #too long 0    string    (***********************************************************************\n\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Mathematica-Compatible Notebook    Mathematica 3.0 notebook
  9455. 0    string    (***********************    Mathematica 3.0 notebook
  9456.  
  9457. # other (* matches it is a comment start in these langs
  9458. # GRR: Too weak; also matches other languages e.g. ML
  9459. #0    string    (*    Mathematica, or Pascal, Modula-2 or 3 code text
  9460.  
  9461. #########################
  9462. # MatLab v5
  9463. 0       string  MATLAB  Matlab v5 mat-file
  9464. >126    short   0x494d  (big endian)
  9465. >>124   beshort x       version 0x%04x
  9466. >126    short   0x4d49  (little endian)
  9467. >>124   leshort x       version 0x%04x
  9468.  
  9469.  
  9470. #------------------------------------------------------------------------------
  9471. # matroska:  file(1) magic for Matroska files
  9472. #
  9473. # See http://www.matroska.org/
  9474. #
  9475.  
  9476. # EBML id:
  9477. 0        belong        0x1a45dfa3
  9478. # DocType id:
  9479. >5        beshort        0x4282
  9480. # DocType contents:
  9481. >>8        string        matroska    Matroska data
  9482.  
  9483. #------------------------------------------------------------------------------
  9484. # Mavroyanopoulos Nikos <nmav@hellug.gr>
  9485. # mcrypt:   file(1) magic for mcrypt 2.2.x;
  9486. 0    string        \0m\3        mcrypt 2.5 encrypted data,
  9487. >4    string        >\0        algorithm: %s,
  9488. >>&1    leshort        >0        keysize: %d bytes,
  9489. >>>&0    string        >\0        mode: %s,
  9490.  
  9491. 0    string        \0m\2        mcrypt 2.2 encrypted data,
  9492. >3    byte        0        algorithm: blowfish-448,
  9493. >3    byte        1        algorithm: DES,
  9494. >3    byte        2        algorithm: 3DES,
  9495. >3    byte        3        algorithm: 3-WAY,
  9496. >3    byte        4        algorithm: GOST,
  9497. >3    byte        6        algorithm: SAFER-SK64,
  9498. >3    byte        7        algorithm: SAFER-SK128,
  9499. >3    byte        8        algorithm: CAST-128,
  9500. >3    byte        9        algorithm: xTEA,
  9501. >3    byte        10        algorithm: TWOFISH-128,
  9502. >3    byte        11        algorithm: RC2,
  9503. >3    byte        12        algorithm: TWOFISH-192,
  9504. >3    byte        13        algorithm: TWOFISH-256,
  9505. >3    byte        14        algorithm: blowfish-128,
  9506. >3    byte        15        algorithm: blowfish-192,
  9507. >3    byte        16        algorithm: blowfish-256,
  9508. >3    byte        100        algorithm: RC6,
  9509. >3    byte        101        algorithm: IDEA,
  9510. >4    byte        0        mode: CBC,
  9511. >4    byte        1        mode: ECB,
  9512. >4    byte        2        mode: CFB,
  9513. >4    byte        3        mode: OFB,
  9514. >4    byte        4        mode: nOFB,
  9515. >5    byte        0        keymode: 8bit
  9516. >5    byte        1        keymode: 4bit
  9517. >5    byte        2        keymode: SHA-1 hash
  9518. >5    byte        3        keymode: MD5 hash
  9519.  
  9520. #------------------------------------------------------------------------------
  9521. # mercurial:  file(1) magic for Mercurial changeset bundles
  9522. # http://www.selenic.com/mercurial/wiki/
  9523. #
  9524. # Jesse Glick (jesse.glick@sun.com)
  9525. #
  9526.  
  9527. 0    string        HG10        Mercurial changeset bundle
  9528. >4    string        UN        (uncompressed)
  9529. >4    string        GZ        (gzip compressed)
  9530. >4    string        BZ        (bzip2 compressed)
  9531. #------------------------------------------------------------------------------
  9532. # mime:  file(1) magic for MIME encoded files
  9533. #
  9534. 0    string        Content-Type:\ 
  9535. >14    string        >\0        %s
  9536. 0    string        Content-Type:
  9537. >13    string        >\0        %s
  9538.  
  9539. #------------------------------------------------------------------------------
  9540. # mips:  file(1) magic for Silicon Graphics (MIPS, IRIS, IRIX, etc.)
  9541. #                         Dec Ultrix (MIPS)
  9542. # all of SGI's *current* machines and OSes run in big-endian mode on the
  9543. # MIPS machines, as far as I know.
  9544. #
  9545. # XXX - what is the blank "-" line?
  9546. #
  9547. # kbd file definitions
  9548. 0    string    kbd!map        kbd map file
  9549. >8    byte    >0        Ver %d:
  9550. >10    short    >0        with %d table(s)
  9551. 0    belong    0407        old SGI 68020 executable
  9552. 0    belong    0410        old SGI 68020 pure executable
  9553. 0    beshort    0x8765        disk quotas file
  9554. 0    beshort    0x0506        IRIS Showcase file
  9555. >2    byte    0x49        -
  9556. >3    byte    x        - version %ld
  9557. 0    beshort    0x0226        IRIS Showcase template
  9558. >2    byte    0x63        -
  9559. >3    byte    x        - version %ld
  9560. 0    belong    0x5343464d    IRIS Showcase file
  9561. >4    byte    x        - version %ld
  9562. 0    belong    0x5443464d    IRIS Showcase template
  9563. >4    byte    x        - version %ld
  9564. 0    belong    0xdeadbabe    IRIX Parallel Arena
  9565. >8    belong    >0        - version %ld
  9566. #
  9567. 0    beshort    0x0160        MIPSEB ECOFF executable
  9568. >20    beshort    0407        (impure)
  9569. >20    beshort    0410        (swapped)
  9570. >20    beshort    0413        (paged)
  9571. >8    belong    >0        not stripped
  9572. >8    belong    0        stripped
  9573. >22    byte    x        - version %ld
  9574. >23    byte    x        .%ld
  9575. #
  9576. 0    beshort    0x0162        MIPSEL-BE ECOFF executable
  9577. >20    beshort    0407        (impure)
  9578. >20    beshort    0410        (swapped)
  9579. >20    beshort    0413        (paged)
  9580. >8    belong    >0        not stripped
  9581. >8    belong    0        stripped
  9582. >23    byte    x        - version %d
  9583. >22    byte    x        .%ld
  9584. #
  9585. 0    beshort    0x6001        MIPSEB-LE ECOFF executable
  9586. >20    beshort    03401        (impure)
  9587. >20    beshort    04001        (swapped)
  9588. >20    beshort    05401        (paged)
  9589. >8    belong    >0        not stripped
  9590. >8    belong    0        stripped
  9591. >23    byte    x        - version %d
  9592. >22    byte    x        .%ld
  9593. #
  9594. 0    beshort    0x6201        MIPSEL ECOFF executable
  9595. >20    beshort    03401        (impure)
  9596. >20    beshort    04001        (swapped)
  9597. >20    beshort    05401        (paged)
  9598. >8    belong    >0        not stripped
  9599. >8    belong    0        stripped
  9600. >23    byte    x        - version %ld
  9601. >22    byte    x        .%ld
  9602. #
  9603. # MIPS 2 additions
  9604. #
  9605. 0    beshort    0x0163        MIPSEB MIPS-II ECOFF executable
  9606. >20    beshort    0407        (impure)
  9607. >20    beshort    0410        (swapped)
  9608. >20    beshort    0413        (paged)
  9609. >8    belong    >0        not stripped
  9610. >8    belong    0        stripped
  9611. >22    byte    x        - version %ld
  9612. >23    byte    x        .%ld
  9613. #
  9614. 0    beshort    0x0166        MIPSEL-BE MIPS-II ECOFF executable
  9615. >20    beshort    0407        (impure)
  9616. >20    beshort    0410        (swapped)
  9617. >20    beshort    0413        (paged)
  9618. >8    belong    >0        not stripped
  9619. >8    belong    0        stripped
  9620. >22    byte    x        - version %ld
  9621. >23    byte    x        .%ld
  9622. #
  9623. 0    beshort    0x6301        MIPSEB-LE MIPS-II ECOFF executable
  9624. >20    beshort    03401        (impure)
  9625. >20    beshort    04001        (swapped)
  9626. >20    beshort    05401        (paged)
  9627. >8    belong    >0        not stripped
  9628. >8    belong    0        stripped
  9629. >23    byte    x        - version %ld
  9630. >22    byte    x        .%ld
  9631. #
  9632. 0    beshort    0x6601        MIPSEL MIPS-II ECOFF executable
  9633. >20    beshort    03401        (impure)
  9634. >20    beshort    04001        (swapped)
  9635. >20    beshort    05401        (paged)
  9636. >8    belong    >0        not stripped
  9637. >8    belong    0        stripped
  9638. >23    byte    x        - version %ld
  9639. >22    byte    x        .%ld
  9640. #
  9641. # MIPS 3 additions
  9642. #
  9643. 0    beshort    0x0140        MIPSEB MIPS-III ECOFF executable
  9644. >20    beshort    0407        (impure)
  9645. >20    beshort    0410        (swapped)
  9646. >20    beshort    0413        (paged)
  9647. >8    belong    >0        not stripped
  9648. >8    belong    0        stripped
  9649. >22    byte    x        - version %ld
  9650. >23    byte    x        .%ld
  9651. #
  9652. 0    beshort    0x0142        MIPSEL-BE MIPS-III ECOFF executable
  9653. >20    beshort    0407        (impure)
  9654. >20    beshort    0410        (swapped)
  9655. >20    beshort    0413        (paged)
  9656. >8    belong    >0        not stripped
  9657. >8    belong    0        stripped
  9658. >22    byte    x        - version %ld
  9659. >23    byte    x        .%ld
  9660. #
  9661. 0    beshort    0x4001        MIPSEB-LE MIPS-III ECOFF executable
  9662. >20    beshort    03401        (impure)
  9663. >20    beshort    04001        (swapped)
  9664. >20    beshort    05401        (paged)
  9665. >8    belong    >0        not stripped
  9666. >8    belong    0        stripped
  9667. >23    byte    x        - version %ld
  9668. >22    byte    x        .%ld
  9669. #
  9670. 0    beshort    0x4201        MIPSEL MIPS-III ECOFF executable
  9671. >20    beshort    03401        (impure)
  9672. >20    beshort    04001        (swapped)
  9673. >20    beshort    05401        (paged)
  9674. >8    belong    >0        not stripped
  9675. >8    belong    0        stripped
  9676. >23    byte    x        - version %ld
  9677. >22    byte    x        .%ld
  9678. #
  9679. 0    beshort    0x180        MIPSEB Ucode
  9680. 0    beshort    0x182        MIPSEL-BE Ucode
  9681. # 32bit core file
  9682. 0    belong    0xdeadadb0    IRIX core dump
  9683. >4    belong    1        of
  9684. >16    string    >\0        '%s'
  9685. # 64bit core file
  9686. 0    belong    0xdeadad40    IRIX 64-bit core dump
  9687. >4    belong    1        of
  9688. >16    string    >\0        '%s'
  9689. # N32bit core file
  9690. 0       belong    0xbabec0bb    IRIX N32 core dump
  9691. >4      belong    1               of
  9692. >16     string    >\0             '%s'
  9693. # New style crash dump file
  9694. 0    string    \x43\x72\x73\x68\x44\x75\x6d\x70    IRIX vmcore dump of
  9695. >36    string    >\0                    '%s'
  9696. # Trusted IRIX info
  9697. 0    string    SGIAUDIT    SGI Audit file
  9698. >8    byte    x        - version %d
  9699. >9    byte    x        .%ld
  9700. #
  9701. 0    string    WNGZWZSC    Wingz compiled script
  9702. 0    string    WNGZWZSS    Wingz spreadsheet
  9703. 0    string    WNGZWZHP    Wingz help file
  9704. #
  9705. 0    string    #Inventor V    IRIS Inventor 1.0 file
  9706. 0    string    #Inventor V2    Open Inventor 2.0 file
  9707. # GLF is OpenGL stream encoding
  9708. 0    string    glfHeadMagic();        GLF_TEXT
  9709. 4    belong    0x7d000000        GLF_BINARY_LSB_FIRST
  9710. 4    belong    0x0000007d        GLF_BINARY_MSB_FIRST
  9711. # GLS is OpenGL stream encoding; GLS is the successor of GLF
  9712. 0    string    glsBeginGLS(        GLS_TEXT
  9713. 4    belong    0x10000000        GLS_BINARY_LSB_FIRST
  9714. 4    belong    0x00000010        GLS_BINARY_MSB_FIRST
  9715.  
  9716. #------------------------------------------------------------------------------
  9717. # mirage:  file(1) magic for Mirage executables
  9718. #
  9719. # XXX - byte order?
  9720. #
  9721. 0    long    31415        Mirage Assembler m.out executable
  9722. #-----------------------------------------------------------------------------
  9723. # misctools:  file(1) magic for miscellaneous UNIX tools.
  9724. #
  9725. 0    search/1    %%!!            X-Post-It-Note text
  9726. 0    string/c    BEGIN:VCALENDAR        vCalendar calendar file
  9727. 0    string/c    BEGIN:VCARD        vCard visiting card
  9728. !:mime    text/x-vcard
  9729.  
  9730. # From: Alex Beregszaszi <alex@fsn.hu>
  9731. 4    string    gtktalog        GNOME Catalogue (gtktalog)
  9732. >13    string    >\0            version %s
  9733.  
  9734. # From: Tomasz Trojanowski <tomek@uninet.com.pl>
  9735. 0    search/80    .la\ -\ a\ libtool\ library\ file    libtool library file
  9736.  
  9737. #------------------------------------------------------------------------------
  9738. # mkid:  file(1) magic for mkid(1) databases
  9739. #
  9740. # ID is the binary tags database produced by mkid(1).
  9741. #
  9742. # XXX - byte order?
  9743. #
  9744. 0    string        \311\304    ID tags data
  9745. >2    short        >0        version %d
  9746.  
  9747. #------------------------------------------------------------------------------
  9748. # mlssa: file(1) magic for MLSSA datafiles
  9749. #
  9750. 0        lelong        0xffffabcd    MLSSA datafile,
  9751. >4        leshort        x        algorithm %d,
  9752. >10        lelong        x        %d samples
  9753.  
  9754. #------------------------------------------------------------------------------
  9755. # mmdf:  file(1) magic for MMDF mail files
  9756. #
  9757. 0    string    \001\001\001\001    MMDF mailbox
  9758. #------------------------------------------------------------------------------
  9759. # modem:  file(1) magic for modem programs
  9760. #
  9761. # From: Florian La Roche <florian@knorke.saar.de>
  9762. 1    string        PC\ Research,\ Inc    Digifax-G3-File
  9763. >29    byte        1            \b, fine resolution
  9764. >29    byte        0            \b, normal resolution
  9765.  
  9766. 0    short        0x0100        raw G3 data, byte-padded
  9767. 0    short        0x1400        raw G3 data
  9768. #
  9769. # Magic data for vgetty voice formats
  9770. # (Martin Seine & Marc Eberhard)
  9771.  
  9772. #
  9773. # raw modem data version 1
  9774. #
  9775. 0    string    RMD1      raw modem data
  9776. >4   string    >\0       (%s /
  9777. >20  short     >0        compression type 0x%04x)
  9778.  
  9779. #
  9780. # portable voice format 1
  9781. #
  9782. 0    string    PVF1\n         portable voice format
  9783. >5   string    >\0       (binary %s)
  9784.  
  9785. #
  9786. # portable voice format 2
  9787. #
  9788. 0    string    PVF2\n         portable voice format
  9789. >5   string >\0          (ascii %s)
  9790.  
  9791.  
  9792. #------------------------------------------------------------------------------
  9793. # motorola:  file(1) magic for Motorola 68K and 88K binaries
  9794. #
  9795. # 68K
  9796. #
  9797. 0    beshort        0520        mc68k COFF
  9798. >18    beshort        ^00000020    object
  9799. >18    beshort        &00000020    executable
  9800. >12    belong        >0        not stripped
  9801. >168    string        .lowmem        Apple toolbox
  9802. >20    beshort        0407        (impure)
  9803. >20    beshort        0410        (pure)
  9804. >20    beshort        0413        (demand paged)
  9805. >20    beshort        0421        (standalone)
  9806. 0    beshort        0521        mc68k executable (shared)
  9807. >12    belong        >0        not stripped
  9808. 0    beshort        0522        mc68k executable (shared demand paged)
  9809. >12    belong        >0        not stripped
  9810. #
  9811. # Motorola/UniSoft 68K Binary Compatibility Standard (BCS)
  9812. #
  9813. 0    beshort        0554        68K BCS executable
  9814. #
  9815. # 88K
  9816. #
  9817. # Motorola/88Open BCS
  9818. #
  9819. 0    beshort        0555        88K BCS executable
  9820. #
  9821. # Motorola S-Records, from Gerd Truschinski <gt@freebsd.first.gmd.de>
  9822. 0   string      S0          Motorola S-Record; binary data in text format
  9823.  
  9824. # ATARI ST relocatable PRG
  9825. #
  9826. # from Oskar Schirmer <schirmer@scara.com> Feb 3, 2001
  9827. # (according to Roland Waldi, Oct 21, 1987)
  9828. # besides the magic 0x601a, the text segment size is checked to be
  9829. # not larger than 1 MB (which is a lot on ST).
  9830. # The additional 0x601b distinction I took from Doug Lee's magic.
  9831. 0    belong&0xFFFFFFF0    0x601A0000    Atari ST M68K contiguous executable
  9832. >2    belong            x        (txt=%ld,
  9833. >6    belong            x        dat=%ld,
  9834. >10    belong            x        bss=%ld,
  9835. >14    belong            x        sym=%ld)
  9836. 0    belong&0xFFFFFFF0    0x601B0000    Atari ST M68K non-contig executable
  9837. >2    belong            x        (txt=%ld,
  9838. >6    belong            x        dat=%ld,
  9839. >10    belong            x        bss=%ld,
  9840. >14    belong            x        sym=%ld)
  9841.  
  9842. # Atari ST/TT... program format (sent by Wolfram Kleff <kleff@cs.uni-bonn.de>)
  9843. 0       beshort         0x601A          Atari 68xxx executable,
  9844. >2      belong          x               text len %lu,
  9845. >6      belong          x               data len %lu,
  9846. >10     belong          x               BSS len %lu,
  9847. >14     belong          x               symboltab len %lu,
  9848. >18     belong          0
  9849. >22     belong          &0x01           fastload flag,
  9850. >22     belong          &0x02           may be loaded to alternate RAM,
  9851. >22     belong          &0x04           malloc may be from alternate RAM,
  9852. >22     belong          x               flags: 0x%lX,
  9853. >26     beshort         0               no relocation tab
  9854. >26     beshort         !0              + relocation tab
  9855. >30     string          SFX             [Self-Extracting LZH SFX archive]
  9856. >38     string          SFX             [Self-Extracting LZH SFX archive]
  9857. >44     string          ZIP!            [Self-Extracting ZIP SFX archive]
  9858.  
  9859. 0       beshort         0x0064          Atari 68xxx CPX file
  9860. >8      beshort         x               (version %04lx)
  9861.  
  9862. #------------------------------------------------------------------------------
  9863. # mozilla:  file(1) magic for Mozilla XUL fastload files 
  9864. # (XUL.mfasl and XPC.mfasl)
  9865. # URL:    http://www.mozilla.org/
  9866. # From:    Josh Triplett <josh@freedesktop.org>
  9867.  
  9868. 0    string    XPCOM\nMozFASL\r\n\x1A        Mozilla XUL fastload data
  9869.  
  9870. #------------------------------------------------------------------------------
  9871. # msdos:  file(1) magic for MS-DOS files
  9872. #
  9873.  
  9874. # .BAT files (Daniel Quinlan, quinlan@yggdrasil.com)
  9875. # updated by Joerg Jenderek
  9876. 0    string    @            
  9877. >1    string/cB    \ echo\ off    MS-DOS batch file text
  9878. >1    string/cB    echo\ off    MS-DOS batch file text
  9879. >1    string/cB    rem\         MS-DOS batch file text
  9880. >1    string/cB    set\         MS-DOS batch file text
  9881.  
  9882.  
  9883. # OS/2 batch files are REXX. the second regex is a bit generic, oh well
  9884. # the matched commands seem to be common in REXX and uncommon elsewhere
  9885. 100    search/0xffff   rxfuncadd
  9886. >100    regex/c =^[\ \t]{0,10}call[\ \t]{1,10}rxfunc    OS/2 REXX batch file text
  9887. 100    search/0xffff   say
  9888. >100    regex/c =^[\ \t]{0,10}say\ ['"]            OS/2 REXX batch file text
  9889.  
  9890. 0    leshort        0x14c    MS Windows COFF Intel 80386 object file
  9891. #>4    ledate        x    stamp %s
  9892. 0    leshort        0x166    MS Windows COFF MIPS R4000 object file
  9893. #>4    ledate        x    stamp %s
  9894. 0    leshort        0x184    MS Windows COFF Alpha object file
  9895. #>4    ledate        x    stamp %s
  9896. 0    leshort        0x268    MS Windows COFF Motorola 68000 object file
  9897. #>4    ledate        x    stamp %s
  9898. 0    leshort        0x1f0    MS Windows COFF PowerPC object file
  9899. #>4    ledate        x    stamp %s
  9900. 0    leshort        0x290    MS Windows COFF PA-RISC object file
  9901. #>4    ledate        x    stamp %s
  9902.  
  9903. # XXX - according to Microsoft's spec, at an offset of 0x3c in a
  9904. # PE-format executable is the offset in the file of the PE header;
  9905. # unfortunately, that's a little-endian offset, and there's no way
  9906. # to specify an indirect offset with a specified byte order.
  9907. # So, for now, we assume the standard MS-DOS stub, which puts the
  9908. # PE header at 0x80 = 128.
  9909. #
  9910. # Required OS version and subsystem version were 4.0 on some NT 3.51
  9911. # executables built with Visual C++ 4.0, so it's not clear that
  9912. # they're interesting.  The user version was 0.0, but there's
  9913. # probably some linker directive to set it.  The linker version was
  9914. # 3.0, except for one ".exe" which had it as 4.20 (same damn linker!).
  9915. #
  9916. # many of the compressed formats were extraced from IDARC 1.23 source code
  9917. #
  9918. 0    string    MZ        MS-DOS executable
  9919. !:mime    application/x-dosexec
  9920. >0 string MZ\0\0\0\0\0\0\0\0\0\0PE\0\0 \b, PE for MS Windows
  9921. >>&18    leshort&0x2000    >0    (DLL)
  9922. >>&88    leshort        0    (unknown subsystem)
  9923. >>&88    leshort        1    (native)
  9924. >>&88    leshort        2    (GUI)
  9925. >>&88    leshort        3    (console)
  9926. >>&88    leshort        7    (POSIX)
  9927. >>&0    leshort        0x0    unknown processor
  9928. >>&0    leshort        0x14c    Intel 80386
  9929. >>&0    leshort        0x166    MIPS R4000
  9930. >>&0    leshort        0x184    Alpha
  9931. >>&0    leshort        0x268    Motorola 68000
  9932. >>&0    leshort        0x1f0    PowerPC
  9933. >>&0    leshort        0x290    PA-RISC
  9934. >>&18    leshort&0x0100    >0    32-bit
  9935. >>&18    leshort&0x1000    >0    system file
  9936. >>&228    lelong        >0    \b, Mono/.Net assembly
  9937. >>&0xf4 search/0x140 \x0\x40\x1\x0
  9938. >>>(&0.l+(4)) string MSCF \b, WinHKI CAB self-extracting archive
  9939. >30        string    Copyright\ 1989-1990\ PKWARE\ Inc.    Self-extracting PKZIP archive
  9940. !:mime    application/zip
  9941. # Is next line correct? One might expect "Corp." not "Copr." If it is right, add a note to that effect.
  9942. >30        string    PKLITE\ Copr.    Self-extracting PKZIP archive
  9943. !:mime    application/zip
  9944.  
  9945. >0x18  leshort >0x3f
  9946. >>(0x3c.l) string PE\0\0 PE 
  9947. # hooray, there's a DOS extender using the PE format, with a valid PE
  9948. # executable inside (which just prints a message and exits if run in win)
  9949. >>>(8.s*16) string 32STUB for MS-DOS, 32rtm DOS extender
  9950. >>>(8.s*16) string !32STUB for MS Windows
  9951. >>>>(0x3c.l+22)    leshort&0x2000    >0    (DLL)
  9952. >>>>(0x3c.l+92)    leshort        0    (unknown subsystem)
  9953. >>>>(0x3c.l+92)    leshort        1    (native)
  9954. >>>>(0x3c.l+92)    leshort        2    (GUI)
  9955. >>>>(0x3c.l+92)    leshort        3    (console)
  9956. >>>>(0x3c.l+92)    leshort        7    (POSIX)
  9957. >>>>(0x3c.l+4)    leshort        0x0    unknown processor
  9958. >>>>(0x3c.l+4)    leshort        0x14c    Intel 80386
  9959. >>>>(0x3c.l+4)    leshort        0x166    MIPS R4000
  9960. >>>>(0x3c.l+4)    leshort        0x184    Alpha
  9961. >>>>(0x3c.l+4)    leshort        0x268    Motorola 68000
  9962. >>>>(0x3c.l+4)    leshort        0x1f0    PowerPC
  9963. >>>>(0x3c.l+4)    leshort        0x290    PA-RISC
  9964. >>>>(0x3c.l+22)    leshort&0x0100    >0    32-bit
  9965. >>>>(0x3c.l+22)    leshort&0x1000    >0    system file
  9966. >>>>(0x3c.l+232)    lelong    >0    \b, Mono/.Net assembly
  9967.  
  9968. >>>>(0x3c.l+0xf8)    string        UPX0 \b, UPX compressed
  9969. >>>>(0x3c.l+0xf8)    search/0x140    PEC2 \b, PECompact2 compressed
  9970. >>>>(0x3c.l+0xf8)    search/0x140    UPX2
  9971. >>>>>(&0x10.l+(-4))    string        PK\3\4 \b, ZIP self-extracting archive (Info-Zip)
  9972. >>>>(0x3c.l+0xf8)    search/0x140    .idata
  9973. >>>>>(&0xe.l+(-4))    string        PK\3\4 \b, ZIP self-extracting archive (Info-Zip)
  9974. >>>>>(&0xe.l+(-4))    string        ZZ0 \b, ZZip self-extracting archive
  9975. >>>>>(&0xe.l+(-4))    string        ZZ1 \b, ZZip self-extracting archive
  9976. >>>>(0x3c.l+0xf8)    search/0x140    .rsrc
  9977. >>>>>(&0x0f.l+(-4))    string        a\\\4\5 \b, WinHKI self-extracting archive
  9978. >>>>>(&0x0f.l+(-4))    string        Rar! \b, RAR self-extracting archive
  9979. >>>>>(&0x0f.l+(-4))    search/0x3000    MSCF \b, InstallShield self-extracting archive
  9980. >>>>>(&0x0f.l+(-4))    search/32    Nullsoft \b, Nullsoft Installer self-extracting archive
  9981. >>>>(0x3c.l+0xf8)    search/0x140    .data
  9982. >>>>>(&0x0f.l)        string        WEXTRACT \b, MS CAB-Installer self-extracting archive
  9983. >>>>(0x3c.l+0xf8)    search/0x140    .petite\0 \b, Petite compressed
  9984. >>>>>(0x3c.l+0xf7)    byte        x
  9985. >>>>>>(&0x104.l+(-4))    string        =!sfx! \b, ACE self-extracting archive
  9986. >>>>(0x3c.l+0xf8)    search/0x140    .WISE \b, WISE installer self-extracting archive
  9987. >>>>(0x3c.l+0xf8)    search/0x140    .dz\0\0\0 \b, Dzip self-extracting archive
  9988. >>>>(0x3c.l+0xf8)    search/0x140    .reloc
  9989. >>>>>(&0xe.l+(-4))    search/0x180    PK\3\4 \b, ZIP self-extracting archive (WinZip)
  9990.  
  9991. >>>>&(0x3c.l+0xf8)    search/0x100    _winzip_ \b, ZIP self-extracting archive (WinZip)
  9992. >>>>&(0x3c.l+0xf8)    search/0x100    SharedD \b, Microsoft Installer self-extracting archive
  9993. >>>>0x30        string        Inno \b, InnoSetup self-extracting archive
  9994.  
  9995. >>(0x3c.l)        string        NE \b, NE
  9996. >>>(0x3c.l+0x36)    byte        0 (unknown OS)
  9997. >>>(0x3c.l+0x36)    byte        1 for OS/2 1.x
  9998. >>>(0x3c.l+0x36)    byte        2 for MS Windows 3.x
  9999. >>>(0x3c.l+0x36)    byte        3 for MS-DOS
  10000. >>>(0x3c.l+0x36)    byte        >3 (unknown OS)
  10001. >>>(0x3c.l+0x36)    byte        0x81 for MS-DOS, Phar Lap DOS extender
  10002. >>>(0x3c.l+0x0c)    leshort&0x8003    0x8002 (DLL)
  10003. >>>(0x3c.l+0x0c)    leshort&0x8003    0x8001 (driver)
  10004. >>>&(&0x24.s-1)        string        ARJSFX \b, ARJ self-extracting archive
  10005. >>>(0x3c.l+0x70)    search/0x80    WinZip(R)\ Self-Extractor \b, ZIP self-extracting archive (WinZip)
  10006.  
  10007. >>(0x3c.l)        string        LX\0\0 \b, LX
  10008. >>>(0x3c.l+0x0a)    leshort        <1 (unknown OS)
  10009. >>>(0x3c.l+0x0a)    leshort        1 for OS/2
  10010. >>>(0x3c.l+0x0a)    leshort        2 for MS Windows
  10011. >>>(0x3c.l+0x0a)    leshort        3 for DOS
  10012. >>>(0x3c.l+0x0a)    leshort        >3 (unknown OS)
  10013. >>>(0x3c.l+0x10)    lelong&0x28000    =0x8000 (DLL)
  10014. >>>(0x3c.l+0x10)    lelong&0x20000    >0 (device driver)
  10015. >>>(0x3c.l+0x10)    lelong&0x300    0x300 (GUI)
  10016. >>>(0x3c.l+0x10)    lelong&0x28300    <0x300 (console)
  10017. >>>(0x3c.l+0x08)    leshort        1 i80286
  10018. >>>(0x3c.l+0x08)    leshort        2 i80386
  10019. >>>(0x3c.l+0x08)    leshort        3 i80486
  10020. >>>(8.s*16)        string        emx \b, emx
  10021. >>>>&1            string        x %s
  10022. >>>&(&0x54.l-3)        string        arjsfx \b, ARJ self-extracting archive
  10023.  
  10024. # MS Windows system file, supposedly a collection of LE executables
  10025. >>(0x3c.l)        string        W3 \b, W3 for MS Windows
  10026.  
  10027. >>(0x3c.l)        string        LE\0\0 \b, LE executable
  10028. >>>(0x3c.l+0x0a)    leshort        1
  10029. # some DOS extenders use LE files with OS/2 header
  10030. >>>>0x240        search/0x100    DOS/4G for MS-DOS, DOS4GW DOS extender
  10031. >>>>0x240        search/0x200    WATCOM\ C/C++ for MS-DOS, DOS4GW DOS extender
  10032. >>>>0x440        search/0x100    CauseWay\ DOS\ Extender for MS-DOS, CauseWay DOS extender
  10033. >>>>0x40        search/0x40    PMODE/W for MS-DOS, PMODE/W DOS extender
  10034. >>>>0x40        search/0x40    STUB/32A for MS-DOS, DOS/32A DOS extender (stub)
  10035. >>>>0x40        search/0x80    STUB/32C for MS-DOS, DOS/32A DOS extender (configurable stub)
  10036. >>>>0x40        search/0x80    DOS/32A for MS-DOS, DOS/32A DOS extender (embedded)
  10037. # this is a wild guess; hopefully it is a specific signature
  10038. >>>>&0x24        lelong        <0x50
  10039. >>>>>(&0x4c.l)        string        \xfc\xb8WATCOM
  10040. >>>>>>&0        search/8    3\xdbf\xb9 \b, 32Lite compressed
  10041. # another wild guess: if real OS/2 LE executables exist, they probably have higher start EIP
  10042. #>>>>(0x3c.l+0x1c)    lelong        >0x10000 for OS/2
  10043. # fails with DOS-Extenders.
  10044. >>>(0x3c.l+0x0a)    leshort        2 for MS Windows
  10045. >>>(0x3c.l+0x0a)    leshort        3 for DOS
  10046. >>>(0x3c.l+0x0a)    leshort        4 for MS Windows (VxD)
  10047. >>>(&0x7c.l+0x26)    string        UPX \b, UPX compressed
  10048. >>>&(&0x54.l-3)        string        UNACE \b, ACE self-extracting archive
  10049.  
  10050. # looks like ASCII, probably some embedded copyright message.
  10051. # and definitely not NE/LE/LX/PE
  10052. >>0x3c        lelong    >0x20000000
  10053. >>>(4.s*512)    leshort !0x014c \b, MZ for MS-DOS
  10054. # header data too small for extended executable
  10055. >2        long    !0
  10056. >>0x18        leshort    <0x40
  10057. >>>(4.s*512)    leshort !0x014c
  10058.  
  10059. >>>>&(2.s-514)    string    !LE
  10060. >>>>>&-2    string    !BW \b, MZ for MS-DOS
  10061. >>>>&(2.s-514)    string    LE \b, LE
  10062. >>>>>0x240    search/0x100    DOS/4G for MS-DOS, DOS4GW DOS extender
  10063. # educated guess since indirection is still not capable enough for complex offset
  10064. # calculations (next embedded executable would be at &(&2*512+&0-2)
  10065. # I suspect there are only LE executables in these multi-exe files
  10066. >>>>&(2.s-514)    string    BW
  10067. >>>>>0x240    search/0x100    DOS/4G ,\b LE for MS-DOS, DOS4GW DOS extender (embedded)
  10068. >>>>>0x240    search/0x100    !DOS/4G ,\b BW collection for MS-DOS
  10069.  
  10070. # This sequence skips to the first COFF segment, usually .text
  10071. >(4.s*512)    leshort        0x014c \b, COFF
  10072. >>(8.s*16)    string        go32stub for MS-DOS, DJGPP go32 DOS extender
  10073. >>(8.s*16)    string        emx
  10074. >>>&1        string        x for DOS, Win or OS/2, emx %s
  10075. >>&(&0x42.l-3)    byte        x 
  10076. >>>&0x26    string        UPX \b, UPX compressed
  10077. # and yet another guess: small .text, and after large .data is unusal, could be 32lite
  10078. >>&0x2c        search/0xa0    .text
  10079. >>>&0x0b    lelong        <0x2000
  10080. >>>>&0        lelong        >0x6000 \b, 32lite compressed
  10081.  
  10082. >(8.s*16) string $WdX \b, WDos/X DOS extender
  10083.  
  10084. # .EXE formats (Greg Roelofs, newt@uchicago.edu)
  10085. #
  10086. >0x35   string  \x8e\xc0\xb9\x08\x00\xf3\xa5\x4a\x75\xeb\x8e\xc3\x8e\xd8\x33\xff\xbe\x30\x00\x05 \b, aPack compressed
  10087. >0xe7    string    LH/2\ Self-Extract \b, %s
  10088. >0x1c    string    diet \b, diet compressed
  10089. >0x1c    string    LZ09 \b, LZEXE v0.90 compressed
  10090. >0x1c    string    LZ91 \b, LZEXE v0.91 compressed
  10091. >0x1c   string  tz \b, TinyProg compressed
  10092. >0x1e    string    PKLITE \b, %s compressed
  10093. >0x64   string  W\ Collis\0\0 \b, Compack compressed
  10094. >0x24    string    LHa's\ SFX \b, LHa self-extracting archive
  10095. !:mime    application/x-lha
  10096. >0x24    string    LHA's\ SFX \b, LHa self-extracting archive
  10097. !:mime    application/x-lha
  10098. >0x24   string  \ $ARX \b, ARX self-extracting archive
  10099. >0x24   string  \ $LHarc \b, LHarc self-extracting archive
  10100. >0x20   string  SFX\ by\ LARC \b, LARC self-extracting archive
  10101. >1638    string    -lh5- \b, LHa self-extracting archive v2.13S
  10102. >0x17888 string    Rar! \b, RAR self-extracting archive
  10103. >0x40   string aPKG \b, aPackage self-extracting archive
  10104.  
  10105. >32      string AIN
  10106. >>35     string 2              \b, AIN 2.x compressed
  10107. >>35     string <2             \b, AIN 1.x compressed
  10108. >>35     string >2             \b, AIN 1.x compressed
  10109. >28      string UC2X           \b, UCEXE compressed
  10110. >28      string WWP\           \b, WWPACK compressed
  10111.  
  10112. # skip to the end of the exe
  10113. >(4.s*512)    long    x 
  10114. >>&(2.s-517)    byte    x 
  10115. >>>&0    string        PK\3\4 \b, ZIP self-extracting archive
  10116. >>>&0    string        Rar! \b, RAR self-extracting archive
  10117. >>>&0    string        =!\x11 \b, AIN 2.x self-extracting archive
  10118. >>>&0    string        =!\x12 \b, AIN 2.x self-extracting archive
  10119. >>>&0    string        =!\x17 \b, AIN 1.x self-extracting archive
  10120. >>>&0    string        =!\x18 \b, AIN 1.x self-extracting archive
  10121. >>>&7    search/400    **ACE** \b, ACE self-extracting archive
  10122. >>>&0    search/0x480    UC2SFX\ Header \b, UC2 self-extracting archive
  10123.  
  10124. >0x1c    string        RJSX \b, ARJ self-extracting archive
  10125. # winarj stores a message in the stub instead of the sig in the MZ header
  10126. >0x20    search/0xe0    aRJsfX \b, ARJ self-extracting archive
  10127.  
  10128. # a few unknown ZIP sfxes, no idea if they are needed or if they are
  10129. # already captured by the generic patterns above
  10130. >0x7a        string        Windows\ self-extracting\ ZIP    \b, ZIP self-extracting archive
  10131. >(8.s*16)    search/0x20    PKSFX \b, ZIP self-extracting archive (PKZIP)
  10132. # TODO: how to add this? >FileSize-34 string Windows\ Self-Installing\ Executable \b, ZIP self-extracting archive
  10133. #
  10134.  
  10135. # TELVOX Teleinformatica CODEC self-extractor for OS/2:
  10136. >49801    string    \x79\xff\x80\xff\x76\xff    \b, CODEC archive v3.21
  10137. >>49824    leshort        =1            \b, 1 file
  10138. >>49824    leshort        >1            \b, %u files
  10139.  
  10140. # .COM formats (Daniel Quinlan, quinlan@yggdrasil.com)
  10141. # Uncommenting only the first two lines will cover about 2/3 of COM files,
  10142. # but it isn't feasible to match all COM files since there must be at least
  10143. # two dozen different one-byte "magics".
  10144. #0    byte        0xe9        DOS executable (COM)
  10145. #>0x1FE    leshort        0xAA55        \b, boot code
  10146. >6    string        SFX\ of\ LHarc    (%s)
  10147. 0    belong    0xffffffff        DOS executable (device driver)
  10148. #CMD640X2.SYS
  10149. >10    string    >\x23            
  10150. >>10    string    !\x2e            
  10151. >>>17    string    <\x5B            
  10152. >>>>10    string    x            \b, name: %.8s
  10153. #UDMA.SYS KEYB.SYS CMD640X2.SYS
  10154. >10    string    <\x41            
  10155. >>12    string    >\x40            
  10156. >>>10    string    !$            
  10157. >>>>12    string    x            \b, name: %.8s
  10158. #BTCDROM.SYS ASPICD.SYS
  10159. >22    string    >\x40            
  10160. >>22    string    <\x5B            
  10161. >>>23    string    <\x5B            
  10162. >>>>22    string    x            \b, name: %.8s
  10163. #ATAPICD.SYS
  10164. >76    string    \0            
  10165. >>77    string    >\x40            
  10166. >>>77    string    <\x5B            
  10167. >>>>77    string    x            \b, name: %.8s
  10168. #0    byte        0x8c        DOS executable (COM)
  10169. # 0xeb conflicts with "sequent" magic
  10170. #0    byte        0xeb        DOS executable (COM)
  10171. #>0x1FE    leshort        0xAA55        \b, boot code
  10172. #>85    string        UPX        \b, UPX compressed
  10173. #>4    string        \ $ARX        \b, ARX self-extracting archive
  10174. #>4    string        \ $LHarc    \b, LHarc self-extracting archive
  10175. #>0x20e    string        SFX\ by\ LARC    \b, LARC self-extracting archive
  10176. #0    byte        0xb8        COM executable
  10177. # modified by Joerg Jenderek
  10178. >1    lelong          !0x21cd4cff    for DOS
  10179. # http://syslinux.zytor.com/comboot.php
  10180. # (32-bit COMBOOT) programs *.C32 contain 32-bit code and run in flat-memory 32-bit protected mode
  10181. # start with assembler instructions mov eax,21cd4cffh
  10182. >1    lelong          0x21cd4cff    (32-bit COMBOOT)
  10183. 0    string    \x81\xfc        
  10184. >4    string    \x77\x02\xcd\x20\xb9    
  10185. >>36    string    UPX!             FREE-DOS executable (COM), UPX compressed
  10186. 252    string Must\ have\ DOS\ version    DR-DOS executable (COM)
  10187. # GRR search is not working
  10188. #2    search/28    \xcd\x21    COM executable for MS-DOS
  10189. #WHICHFAT.cOM
  10190. 2    string    \xcd\x21        COM executable for DOS
  10191. #DELTREE.cOM DELTREE2.cOM
  10192. 4    string    \xcd\x21        COM executable for DOS
  10193. #IFMEMDSK.cOM ASSIGN.cOM COMP.cOM
  10194. 5    string    \xcd\x21        COM executable for DOS
  10195. #DELTMP.COm HASFAT32.cOM
  10196. 7    string    \xcd\x21        
  10197. >0    byte    !0xb8            COM executable for DOS
  10198. #COMP.cOM MORE.COm
  10199. 10    string    \xcd\x21        
  10200. >5    string    !\xcd\x21        COM executable for DOS
  10201. #comecho.com
  10202. 13    string    \xcd\x21        COM executable for DOS
  10203. #HELP.COm EDIT.coM
  10204. 18    string    \xcd\x21        COM executable for MS-DOS
  10205. #NWRPLTRM.COm
  10206. 23    string    \xcd\x21        COM executable for MS-DOS
  10207. #LOADFIX.cOm LOADFIX.cOm
  10208. 30    string    \xcd\x21        COM executable for MS-DOS
  10209. #syslinux.com 3.11
  10210. 70    string    \xcd\x21        COM executable for DOS
  10211. # many compressed/converted COMs start with a copy loop instead of a jump
  10212. 0x6    search/0xa    \xfc\x57\xf3\xa5\xc3    COM executable for MS-DOS
  10213. 0x6    search/0xa    \xfc\x57\xf3\xa4\xc3    COM executable for DOS
  10214. >0x18    search/0x10    \x50\xa4\xff\xd5\x73    \b, aPack compressed
  10215. 0x3c    string        W\ Collis\0\0        COM executable for MS-DOS, Compack compressed
  10216. # FIXME: missing diet .com compression
  10217.  
  10218. # miscellaneous formats
  10219. 0    string        LZ        MS-DOS executable (built-in)
  10220. #0    byte        0xf0        MS-DOS program library data
  10221. #
  10222.  
  10223. #
  10224. # Windows Registry files.
  10225. # updated by Joerg Jenderek
  10226. 0    string        regf        Windows NT/XP registry file
  10227. 0    string        CREG        Windows 95/98/ME registry file
  10228. 0    string        SHCC3        Windows 3.1 registry file
  10229.  
  10230.  
  10231. # AAF files:
  10232. # <stuartc@rd.bbc.co.uk> Stuart Cunningham
  10233. 0    string    \320\317\021\340\241\261\032\341AAFB\015\000OM\006\016\053\064\001\001\001\377            AAF legacy file using MS Structured Storage
  10234. >30    byte    9        (512B sectors)
  10235. >30    byte    12        (4kB sectors)
  10236. 0    string    \320\317\021\340\241\261\032\341\001\002\001\015\000\002\000\000\006\016\053\064\003\002\001\001            AAF file using MS Structured Storage
  10237. >30    byte    9        (512B sectors)
  10238. >30    byte    12        (4kB sectors)
  10239.  
  10240. # Popular applications
  10241. 2080    string    Microsoft\ Word\ 6.0\ Document    %s
  10242. !:mime    application/msword
  10243. 2080    string    Documento\ Microsoft\ Word\ 6 Spanish Microsoft Word 6 document data
  10244. !:mime    application/msword
  10245. # Pawel Wiecek <coven@i17linuxb.ists.pwr.wroc.pl> (for polish Word)
  10246. 2112    string    MSWordDoc            Microsoft Word document data
  10247. !:mime    application/msword
  10248. #
  10249. 0    belong    0x31be0000            Microsoft Word Document
  10250. !:mime    application/msword
  10251. #
  10252. 0       string  PO^Q`                Microsoft Word 6.0 Document
  10253. !:mime    application/msword
  10254. #
  10255. 0    string    \376\067\0\043            Microsoft Office Document
  10256. !:mime    application/msword
  10257. 0    string    \333\245-\0\0\0            Microsoft Office Document
  10258. !:mime    application/msword
  10259. 512    string        \354\245\301        Microsoft Word Document
  10260. !:mime    application/msword
  10261. #
  10262. 2080    string    Microsoft\ Excel\ 5.0\ Worksheet    %s
  10263. !:mime    application/vnd.ms-excel
  10264.  
  10265. 2080    string    Foglio\ di\ lavoro\ Microsoft\ Exce    %s
  10266. !:mime    application/vnd.ms-excel
  10267. #
  10268. # Pawel Wiecek <coven@i17linuxb.ists.pwr.wroc.pl> (for polish Excel)
  10269. 2114    string    Biff5        Microsoft Excel 5.0 Worksheet
  10270. !:mime    application/vnd.ms-excel
  10271. # Italian MS-Excel
  10272. 2121    string    Biff5        Microsoft Excel 5.0 Worksheet
  10273. !:mime    application/vnd.ms-excel
  10274. 0    string    \x09\x04\x06\x00\x00\x00\x10\x00    Microsoft Excel Worksheet
  10275. !:mime    application/vnd.ms-excel
  10276. #
  10277. 0    belong    0x00001a00    Lotus 1-2-3
  10278. !:mime    application/x-123
  10279. >4    belong    0x00100400    wk3 document data
  10280. >4    belong    0x02100400    wk4 document data
  10281. >4    belong    0x07800100    fm3 or fmb document data
  10282. >4    belong    0x07800000    fm3 or fmb document data
  10283. #
  10284. 0    belong    0x00000200     Lotus 1-2-3
  10285. !:mime    application/x-123
  10286. >4    belong    0x06040600    wk1 document data
  10287. >4    belong    0x06800200    fmt document data
  10288. 0    string        WordPro\0    Lotus WordPro
  10289. !:mime    application/vnd.lotus-wordpro
  10290. 0    string        WordPro\r\373    Lotus WordPro
  10291. !:mime    application/vnd.lotus-wordpro
  10292.  
  10293.  
  10294. # Help files
  10295. 0    string    ?_\3\0        MS Windows Help Data
  10296.  
  10297. #  DeIsL1.isu what this is I don't know
  10298. 0    string    \161\250\000\000\001\002    DeIsL1.isu whatever that is
  10299.  
  10300. # Winamp .avs
  10301. #0    string    Nullsoft\ AVS\ Preset\ \060\056\061\032    A plug in for Winamp ms-windows Freeware media player
  10302. 0    string    Nullsoft\ AVS\ Preset\     Winamp plug in
  10303.  
  10304. # Hyper terminal:
  10305. 0    string    HyperTerminal\     hyperterm
  10306. >15    string    1.0\ --\ HyperTerminal\ data\ file    MS-windows Hyperterminal
  10307.  
  10308. # Windows Metafont .WMF
  10309. 0       string  \327\315\306\232        ms-windows metafont .wmf
  10310. 0       string  \002\000\011\000        ms-windows metafont .wmf
  10311. 0       string  \001\000\011\000        ms-windows metafont .wmf
  10312.  
  10313. #tz3 files whatever that is (MS Works files)
  10314. 0    string    \003\001\001\004\070\001\000\000    tz3 ms-works file
  10315. 0    string    \003\002\001\004\070\001\000\000    tz3 ms-works file
  10316. 0    string    \003\003\001\004\070\001\000\000    tz3 ms-works file
  10317.  
  10318. # PGP sig files .sig
  10319. #0 string \211\000\077\003\005\000\063\237\127 065 to  \027\266\151\064\005\045\101\233\021\002 PGP sig
  10320. 0 string \211\000\077\003\005\000\063\237\127\065\027\266\151\064\005\045\101\233\021\002 PGP sig
  10321. 0 string \211\000\077\003\005\000\063\237\127\066\027\266\151\064\005\045\101\233\021\002 PGP sig
  10322. 0 string \211\000\077\003\005\000\063\237\127\067\027\266\151\064\005\045\101\233\021\002 PGP sig
  10323. 0 string \211\000\077\003\005\000\063\237\127\070\027\266\151\064\005\045\101\233\021\002 PGP sig
  10324. 0 string \211\000\077\003\005\000\063\237\127\071\027\266\151\064\005\045\101\233\021\002 PGP sig
  10325. 0 string \211\000\225\003\005\000\062\122\207\304\100\345\042 PGP sig
  10326.  
  10327. # windows zips files .dmf
  10328. 0    string    MDIF\032\000\010\000\000\000\372\046\100\175\001\000\001\036\001\000 MS Windows special zipped file
  10329.  
  10330.  
  10331. # Windows help file FTG FTS
  10332. 0    string    \164\146\115\122\012\000\000\000\001\000\000\000    MS Windows help cache
  10333.  
  10334. # grp old windows 3.1 group files
  10335. 0 string  \120\115\103\103    MS Windows 3.1 group files
  10336.  
  10337.  
  10338. # lnk files windows symlinks
  10339. 0    string    \114\000\000\000\001\024\002\000\000\000\000\000\300\000\000\000\000\000\000\106    MS Windows shortcut
  10340.  
  10341. #ico files
  10342. 0    string    \102\101\050\000\000\000\056\000\000\000\000\000\000\000    Icon for MS Windows
  10343.  
  10344. # Windows icons (Ian Springer <ips@fpk.hp.com>)
  10345. 0    string    \000\000\001\000    MS Windows icon resource
  10346. !:mime    image/x-ico
  10347. >4    byte    1            - 1 icon
  10348. >4    byte    >1            - %d icons
  10349. >>6    byte    >0            \b, %dx
  10350. >>>7    byte    >0            \b%d
  10351. >>8    byte    0            \b, 256-colors
  10352. >>8    byte    >0            \b, %d-colors
  10353.  
  10354.  
  10355. # .chr files
  10356. 0    string    PK\010\010BGI    Borland font 
  10357. >4    string    >\0    %s
  10358. # then there is a copyright notice
  10359.  
  10360.  
  10361. # .bgi files
  10362. 0    string    pk\010\010BGI    Borland device 
  10363. >4    string    >\0    %s
  10364. # then there is a copyright notice
  10365.  
  10366.  
  10367. # recycled/info the windows trash bin index
  10368. 9    string    \000\000\000\030\001\000\000\000 MS Windows recycled bin info
  10369.  
  10370.  
  10371. ##### put in Either Magic/font or Magic/news
  10372. # Acroread or something  files wrongly identified as G3  .pfm
  10373. # these have the form \000 \001 any? \002 \000 \000
  10374. # or \000 \001 any? \022 \000 \000
  10375. 0    belong&0xffff00ff    0x00010012    PFM data
  10376. >4    string            \000\000
  10377. >6    string            >\060        - %s
  10378.  
  10379. 0    belong&0xffff00ff    0x00010002    PFM data
  10380. >4    string            \000\000
  10381. >6    string            >\060        - %s
  10382. #0    string  \000\001 pfm?
  10383. #>3    string  \022\000\000Copyright\  yes
  10384. #>3    string  \002\000\000Copyright\  yes
  10385. #>3    string  >\0     oops, not a font file. Cancel that.
  10386. #it clashes with ttf files so put it lower down.
  10387.  
  10388. # From Doug Lee via a FreeBSD pr
  10389. 9    string        GERBILDOC    First Choice document
  10390. 9    string        GERBILDB    First Choice database
  10391. 9    string        GERBILCLIP    First Choice database
  10392. 0    string        GERBIL        First Choice device file
  10393. 9    string        RABBITGRAPH    RabbitGraph file
  10394. 0    string        DCU1        Borland Delphi .DCU file
  10395. 0    string        =!<spell>    MKS Spell hash list (old format)
  10396. 0    string        =!<spell2>    MKS Spell hash list
  10397. # Too simple - MPi
  10398. #0    string        AH        Halo(TM) bitmapped font file
  10399. 0    lelong        0x08086b70    TurboC BGI file
  10400. 0    lelong        0x08084b50    TurboC Font file
  10401.  
  10402. # WARNING: below line conflicts with Infocom game data Z-machine 3
  10403. 0    byte        0x03        DBase 3 data file
  10404. >0x04    lelong        0        (no records)
  10405. >0x04    lelong        >0        (%ld records)
  10406. 0    byte        0x83        DBase 3 data file with memo(s)
  10407. >0x04    lelong        0        (no records)
  10408. >0x04    lelong        >0        (%ld records)
  10409. 0    leshort        0x0006        DBase 3 index file
  10410. 0    string        PMCC        Windows 3.x .GRP file
  10411. 1    string        RDC-meg        MegaDots 
  10412. >8    byte        >0x2F        version %c
  10413. >9    byte        >0x2F        \b.%c file
  10414. 0    lelong        0x4C
  10415. >4    lelong        0x00021401    Windows shortcut file
  10416.  
  10417. # DOS EPS Binary File Header
  10418. # From: Ed Sznyter <ews@Black.Market.NET>
  10419. 0    belong        0xC5D0D3C6    DOS EPS Binary File
  10420. >4    long        >0        Postscript starts at byte %d
  10421. >>8    long        >0        length %d
  10422. >>>12    long        >0        Metafile starts at byte %d
  10423. >>>>16    long        >0        length %d
  10424. >>>20    long        >0        TIFF starts at byte %d
  10425. >>>>24    long        >0        length %d
  10426.  
  10427. # TNEF magic From "Joomy" <joomy@se-ed.net> 
  10428. # Microsoft Outlook's Transport Neutral Encapsulation Format (TNEF)
  10429. 0    leshort        0x223e9f78    TNEF
  10430. !:mime    application/vnd.ms-tnef
  10431.  
  10432. # HtmlHelp files (.chm)
  10433. 0    string  ITSF\003\000\000\000\x60\000\000\000\001\000\000\000    MS Windows HtmlHelp Data
  10434.  
  10435. # GFA-BASIC (Wolfram Kleff)
  10436. 2    string        GFA-BASIC3    GFA-BASIC 3 data
  10437.  
  10438. #------------------------------------------------------------------------------
  10439. # From Stuart Caie <kyzer@4u.net> (developer of cabextract)
  10440. # Microsoft Cabinet files
  10441. 0    string        MSCF\0\0\0\0    Microsoft Cabinet archive data
  10442. >8    lelong        x        \b, %u bytes
  10443. >28    leshort        1        \b, 1 file
  10444. >28    leshort        >1        \b, %u files
  10445.  
  10446. # InstallShield Cabinet files
  10447. 0    string        ISc(        InstallShield Cabinet archive data
  10448. >5    byte&0xf0    =0x60         version 6,
  10449. >5    byte&0xf0    !0x60         version 4/5,
  10450. >(12.l+40)    lelong    x        %u files
  10451.  
  10452. # Windows CE package files
  10453. 0    string        MSCE\0\0\0\0    Microsoft WinCE install header
  10454. >20    lelong        0        \b, architecture-independent
  10455. >20    lelong        103        \b, Hitachi SH3
  10456. >20    lelong        104        \b, Hitachi SH4
  10457. >20    lelong        0xA11        \b, StrongARM
  10458. >20    lelong        4000        \b, MIPS R4000
  10459. >20    lelong        10003        \b, Hitachi SH3
  10460. >20    lelong        10004        \b, Hitachi SH3E
  10461. >20    lelong        10005        \b, Hitachi SH4
  10462. >20    lelong        70001        \b, ARM 7TDMI
  10463. >52    leshort        1         \b, 1 file
  10464. >52    leshort        >1         \b, %u files
  10465. >56    leshort        1         \b, 1 registry entry
  10466. >56    leshort        >1         \b, %u registry entries
  10467.  
  10468. # Outlook Personal Folders
  10469. 0    lelong    0x4E444221    Microsoft Outlook binary email folder
  10470. >10    leshort 0x0e        (Outlook <=2002)
  10471. >10    leshort 0x17        (Outlook >=2003)
  10472.  
  10473.  
  10474. # From: Dirk Jagdmann <doj@cubic.org>
  10475. 0    lelong    0x00035f3f    Windows 3.x help file
  10476.  
  10477. # Christophe Monniez
  10478. 0    string    Client\ UrlCache\ MMF     Microsoft Internet Explorer Cache File
  10479. >20    string    >\0            Version %s
  10480. 0    string    \xCF\xAD\x12\xFE    Microsoft Outlook Express DBX File
  10481. >4    byte    =0xC5            Message database
  10482. >4    byte    =0xC6            Folder database
  10483. >4    byte    =0xC7            Accounts informations
  10484. >4    byte    =0x30            Offline database
  10485.  
  10486.  
  10487. # Windows Enhanced Metafile (EMF)
  10488. # See msdn.microsoft.com/archive/en-us/dnargdi/html/msdn_enhmeta.asp 
  10489. # for further information. Note that "0 lelong 1" should be true i.e.
  10490. # the first double word in the file should be 1. With the extended
  10491. # syntax available by some file commands you could write:
  10492. # 0 lelong 1
  10493. # &40 ulelong 0x464D4520 Windows Enhanced Metafile (EMF) image data
  10494. #40    ulelong 0x464D4520    Windows Enhanced Metafile (EMF) image data
  10495. #>44    ulelong x        version 0x%x.
  10496. # If the description has a length greater than zero, it exists and is 
  10497. # found at offset (*64).
  10498. #>64    ulelong >0        Description available at offset 0x%x
  10499. #>>60    ulelong    >0        (length 0x%x)
  10500. # Note it would be better to print out the description, which is found 
  10501. # as below. Unfortunately the following only prints out the first couple
  10502. # of characters instead of all the "description length"
  10503. # number of characters -- indicated by the ulelong at offset 60.
  10504. #>>(64.l)  lestring16 >0 Description: %15.15s
  10505.  
  10506. # From: Alex Beregszaszi <alex@fsn.hu>
  10507. 0    string    COWD        VMWare3
  10508. >4    byte    3         disk image
  10509. >>32    lelong    x        (%d/
  10510. >>36    lelong    x        \b%d/
  10511. >>40    lelong    x        \b%d)
  10512. >4    byte    2         undoable disk image
  10513. >>32    string  >\0        (%s)
  10514.  
  10515. 0    string    VMDK         VMware4 disk image
  10516. 0    string    KDMV         VMware4 disk image
  10517.  
  10518. #--------------------------------------------------------------------
  10519. # Qemu Emulator Images
  10520. # Lines written by Friedrich Schwittay (f.schwittay@yousable.de)
  10521. # Made by reading sources and doing trial and error on existing
  10522. # qcow files
  10523. 0       string  QFI     Qemu Image, Format: Qcow
  10524.  
  10525. # Uncomment the following line to display Magic (only used for debugging
  10526. # this magic number)
  10527. #>0     string  x       , Magic: %s
  10528.  
  10529. # There are currently 2 Versions: "1" and "2"
  10530. # I do not use Version 2 and therefor branch here
  10531. # but can assure: it works (tested on both versions)
  10532. # Also my Qemu 0.9.0 which uses this Version 2 refuses
  10533. # to start in its bios
  10534. >0x04   belong  2       , Version: 2
  10535. >0x04   belong  1       , Version: 1
  10536.  
  10537. # Using the existence of the Backing File Offset to Branch or not
  10538. # to read Backing File Information
  10539. >>0xc    belong  >0      , Backing File( Offset: %lu
  10540. >>>(0xc.L)       string >\0     , Path: %s
  10541.  
  10542. # Didn't get the trick here how qemu stores the "Size" at this Position
  10543. # There is actually something stored but nothing makes sense
  10544. # The header in the sources talks about it
  10545. #>>>16   lelong  x       , Size: %lu
  10546.  
  10547. # Modification time of the Backing File
  10548. # Really useful if you want to know if your backing
  10549. # file is still usable together with this image
  10550. >>>20    bedate x       , Mtime: %s )
  10551.  
  10552. # Don't know how to calculate in Magicfiles
  10553. # Also: this Information is not reliably
  10554. #       stored in image-files
  10555. >>24     lelong  x       , Disk Size could be: %d * 256 bytes
  10556.  
  10557. 0    string    QEVM        QEMU's suspend to disk image
  10558.  
  10559. 0    string    Bochs\ Virtual\ HD\ Image    Bochs disk image,
  10560. >32    string    x                type %s,
  10561. >48    string    x                subtype %s
  10562.  
  10563. 0    lelong    0x02468ace            Bochs Sparse disk image
  10564.  
  10565. # from http://filext.com by Derek M Jones <derek@knosof.co.uk>
  10566. # False positive with PPT (also currently this string is too long)
  10567. #0    string    \xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3E\x00\x03\x00\xFE\xFF\x09\x00\x06    Microsoft Installer
  10568. 0    string    \320\317\021\340\241\261\032\341    Microsoft Office Document
  10569. #>48    byte    0x1B                                    Excel Document
  10570. #!:mime    application/vnd.ms-excel
  10571. >546    string    bjbj            Microsoft Word Document
  10572. !:mime    application/msword
  10573. >546    string    jbjb            Microsoft Word Document
  10574. !:mime    application/msword
  10575.  
  10576. 0       string    \224\246\056        Microsoft Word Document
  10577. !:mime    application/msword
  10578.  
  10579. 512    string    R\0o\0o\0t\0\ \0E\0n\0t\0r\0y    Microsoft Word Document
  10580. !:mime    application/msword
  10581.  
  10582. # From: "Nelson A. de Oliveira" <naoliv@gmail.com>
  10583. # Magic type for Dell's BIOS .hdr files
  10584. # Dell's .hdr
  10585. 0    string $RBU
  10586. >23    string Dell            %s system BIOS
  10587. >48    string x            version %.3s
  10588.  
  10589. # Type: Microsoft DirectDraw Surface
  10590. # URL:  http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/directx/graphics/reference/DDSFileReference/ddsfileformat.asp
  10591. # From: Morten Hustveit <morten@debian.org>
  10592. 0    string    DDS\040\174\000\000\000    Microsoft DirectDraw Surface (DDS),
  10593. >16    lelong    >0            %hd x
  10594. >12    lelong    >0            %hd,
  10595. >84    string    x            %.4s
  10596.  
  10597. # Type: Microsoft Document Imaging Format (.mdi)
  10598. # URL:  http://en.wikipedia.org/wiki/Microsoft_Document_Imaging_Format
  10599. # From: Daniele Sempione <scrows@oziosi.org>
  10600. 0    short    0x5045            Microsoft Document Imaging Format
  10601.  
  10602. # MS eBook format (.lit)
  10603. 0    string  ITOLITLS        Microsoft Reader eBook Data
  10604. >8    lelong    x            \b, version %u
  10605. !:mime                    application/x-ms-reader
  10606.  
  10607. #------------------------------------------------------------------------------
  10608. # msvc:  file(1) magic for msvc
  10609. # "H. Nanosecond" <aldomel@ix.netcom.com>
  10610. # Microsoft visual C
  10611. # I have version 1.0
  10612.  
  10613. # .aps
  10614. 0    string    HWB\000\377\001\000\000\000    Microsoft Visual C .APS file
  10615.  
  10616. # .ide
  10617. #too long 0    string    \102\157\162\154\141\156\144\040\103\053\053\040\120\162\157\152\145\143\164\040\106\151\154\145\012\000\032\000\002\000\262\000\272\276\372\316    MSVC .ide
  10618. 0    string    \102\157\162\154\141\156\144\040\103\053\053\040\120\162\157    MSVC .ide
  10619.  
  10620. # .res
  10621. 0    string    \000\000\000\000\040\000\000\000\377    MSVC .res
  10622. 0    string    \377\003\000\377\001\000\020\020\350    MSVC .res
  10623. 0    string    \377\003\000\377\001\000\060\020\350    MSVC .res
  10624.  
  10625. #.lib
  10626. 0    string    \360\015\000\000    Microsoft Visual C library
  10627. 0    string    \360\075\000\000    Microsoft Visual C library
  10628. 0    string    \360\175\000\000    Microsoft Visual C library
  10629.  
  10630. #.pch
  10631. 0    string    DTJPCH0\000\022\103\006\200    Microsoft Visual C .pch
  10632.  
  10633. # .pdb
  10634. # too long 0    string    Microsoft\ C/C++\ program\ database\ 
  10635. 0    string    Microsoft\ C/C++\     MSVC program database
  10636. >18    string    program\ database\     
  10637. >33    string    >\0    ver %s
  10638.  
  10639. #.sbr
  10640. 0    string    \000\002\000\007\000    MSVC .sbr
  10641. >5    string     >\0    %s
  10642.  
  10643. #.bsc
  10644. 0    string    \002\000\002\001    MSVC .bsc
  10645.  
  10646. #.wsp
  10647. 0    string    1.00\ .0000.0000\000\003    MSVC .wsp version 1.0000.0000
  10648. # these seem to start with the version and contain menus
  10649. # ------------------------------------------------------------------------
  10650. # mup: file(1) magic for Mup (Music Publisher) input file.
  10651. #
  10652. # From: Abel Cheung <abel (@) oaka.org>
  10653. #
  10654. # NOTE: This header is mainly proposed in the Arkkra mailing list,
  10655. # and is not a mandatory header because of old mup input file
  10656. # compatibility. Noteedit also use mup format, but is not forcing
  10657. # user to use any header as well.
  10658. #
  10659. 0        search/1    //!Mup        Mup music publication program input text
  10660. >6        string        -Arkkra        (Arkkra)
  10661. >>13        string        -        
  10662. >>>16        string        .        
  10663. >>>>14        string        x        \b, need V%.4s
  10664. >>>15        string        .        
  10665. >>>>14        string        x        \b, need V%.3s
  10666. >6        string        -        
  10667. >>9        string        .        
  10668. >>>7        string        x        \b, need V%.4s
  10669. >>8        string        .        
  10670. >>>7        string        x        \b, need V%.3s
  10671.  
  10672. #-----------------------------------------------------------------------------
  10673. # natinst:  file(1) magic for National Instruments Code Files
  10674.  
  10675. #
  10676. # From <egamez@fcfm.buap.mx> Enrique Gßmez-Flores
  10677. # version 1
  10678. # Many formats still missing, we use, for the moment LabVIEW
  10679. # We guess VXI format file. VISA, LabWindowsCVI, BridgeVIEW, etc, are missing
  10680. #
  10681. 0       string          RSRC            National Instruments,
  10682. # Check if it's a LabVIEW File
  10683. >8      string          LV              LabVIEW File,
  10684. # Check wich kind of file is
  10685. >>10    string          SB              Code Resource File, data
  10686. >>10    string          IN              Virtual Instrument Program, data
  10687. >>10    string          AR              VI Library, data
  10688. # This is for Menu Libraries
  10689. >8      string          LMNULBVW        Portable File Names, data
  10690. # This is for General Resources
  10691. >8      string          rsc             Resources File, data
  10692. # This is for VXI Package
  10693. 0       string          VMAP            National Instruments, VXI File, data
  10694.  
  10695. #------------------------------------------------------------------------------
  10696. # ncr:  file(1) magic for NCR Tower objects
  10697. #
  10698. # contributed by
  10699. # Michael R. Wayne  ***  TMC & Associates  ***  INTERNET: wayne@ford-vax.arpa
  10700. # uucp: {philabs | pyramid} !fmsrl7!wayne   OR   wayne@fmsrl7.UUCP
  10701. #
  10702. 0    beshort        000610    Tower/XP rel 2 object
  10703. >12       belong        >0    not stripped
  10704. >20       beshort        0407    executable
  10705. >20       beshort        0410    pure executable
  10706. >22       beshort        >0    - version %ld
  10707. 0    beshort        000615    Tower/XP rel 2 object
  10708. >12       belong        >0    not stripped
  10709. >20       beshort        0407    executable
  10710. >20       beshort        0410    pure executable
  10711. >22       beshort        >0    - version %ld
  10712. 0    beshort        000620    Tower/XP rel 3 object
  10713. >12       belong        >0    not stripped
  10714. >20       beshort        0407    executable
  10715. >20       beshort        0410    pure executable
  10716. >22       beshort        >0    - version %ld
  10717. 0    beshort        000625    Tower/XP rel 3 object
  10718. >12       belong        >0    not stripped
  10719. >20       beshort        0407    executable
  10720. >20       beshort        0410    pure executable
  10721. >22       beshort        >0    - version %ld
  10722. 0    beshort        000630    Tower32/600/400 68020 object
  10723. >12       belong        >0    not stripped
  10724. >20       beshort        0407    executable
  10725. >20       beshort        0410    pure executable
  10726. >22       beshort        >0    - version %ld
  10727. 0    beshort        000640    Tower32/800 68020
  10728. >18       beshort        &020000    w/68881 object
  10729. >18       beshort        &040000    compatible object
  10730. >18       beshort        &060000    object
  10731. >20       beshort        0407    executable
  10732. >20       beshort        0413    pure executable
  10733. >12       belong        >0    not stripped
  10734. >22       beshort        >0    - version %ld
  10735. 0    beshort        000645    Tower32/800 68010
  10736. >18       beshort        &040000    compatible object
  10737. >18       beshort        &060000 object
  10738. >20       beshort        0407    executable
  10739. >20       beshort        0413    pure executable
  10740. >12       belong        >0    not stripped
  10741. >22       beshort        >0    - version %ld
  10742.  
  10743. #------------------------------------------------------------------------------
  10744. # netbsd:  file(1) magic for NetBSD objects
  10745. #
  10746. # All new-style magic numbers are in network byte order.
  10747. #
  10748.  
  10749. 0    lelong            000000407    a.out NetBSD little-endian object file
  10750. >16    lelong            >0        not stripped
  10751. 0    belong            000000407    a.out NetBSD big-endian object file
  10752. >16    belong            >0        not stripped
  10753.  
  10754. 0    belong&0377777777    041400413    a.out NetBSD/i386 demand paged
  10755. >0    byte            &0x80        
  10756. >>20    lelong            <4096        shared library
  10757. >>20    lelong            =4096        dynamically linked executable
  10758. >>20    lelong            >4096        dynamically linked executable
  10759. >0    byte            ^0x80        executable
  10760. >16    lelong            >0        not stripped
  10761. 0    belong&0377777777    041400410    a.out NetBSD/i386 pure
  10762. >0    byte            &0x80        dynamically linked executable
  10763. >0    byte            ^0x80        executable
  10764. >16    lelong            >0        not stripped
  10765. 0    belong&0377777777    041400407    a.out NetBSD/i386
  10766. >0    byte            &0x80        dynamically linked executable
  10767. >0    byte            ^0x80
  10768. >>0    byte            &0x40        position independent
  10769. >>20    lelong            !0        executable
  10770. >>20    lelong            =0        object file
  10771. >16    lelong            >0        not stripped
  10772. 0    belong&0377777777    041400507    a.out NetBSD/i386 core
  10773. >12    string            >\0        from '%s'
  10774. >32    lelong            !0        (signal %d)
  10775.  
  10776. 0    belong&0377777777    041600413    a.out NetBSD/m68k demand paged
  10777. >0    byte            &0x80        
  10778. >>20    belong            <8192        shared library
  10779. >>20    belong            =8192        dynamically linked executable
  10780. >>20    belong            >8192        dynamically linked executable
  10781. >0    byte            ^0x80        executable
  10782. >16    belong            >0        not stripped
  10783. 0    belong&0377777777    041600410    a.out NetBSD/m68k pure
  10784. >0    byte            &0x80        dynamically linked executable
  10785. >0    byte            ^0x80        executable
  10786. >16    belong            >0        not stripped
  10787. 0    belong&0377777777    041600407    a.out NetBSD/m68k
  10788. >0    byte            &0x80        dynamically linked executable
  10789. >0    byte            ^0x80
  10790. >>0    byte            &0x40        position independent
  10791. >>20    belong            !0        executable
  10792. >>20    belong            =0        object file
  10793. >16    belong            >0        not stripped
  10794. 0    belong&0377777777    041600507    a.out NetBSD/m68k core
  10795. >12    string            >\0        from '%s'
  10796. >32    belong            !0        (signal %d)
  10797.  
  10798. 0    belong&0377777777    042000413    a.out NetBSD/m68k4k demand paged
  10799. >0    byte            &0x80        
  10800. >>20    belong            <4096        shared library
  10801. >>20    belong            =4096        dynamically linked executable
  10802. >>20    belong            >4096        dynamically linked executable
  10803. >0    byte            ^0x80        executable
  10804. >16    belong            >0        not stripped
  10805. 0    belong&0377777777    042000410    a.out NetBSD/m68k4k pure
  10806. >0    byte            &0x80        dynamically linked executable
  10807. >0    byte            ^0x80        executable
  10808. >16    belong            >0        not stripped
  10809. 0    belong&0377777777    042000407    a.out NetBSD/m68k4k
  10810. >0    byte            &0x80        dynamically linked executable
  10811. >0    byte            ^0x80
  10812. >>0    byte            &0x40        position independent
  10813. >>20    belong            !0        executable
  10814. >>20    belong            =0        object file
  10815. >16    belong            >0        not stripped
  10816. 0    belong&0377777777    042000507    a.out NetBSD/m68k4k core
  10817. >12    string            >\0        from '%s'
  10818. >32    belong            !0        (signal %d)
  10819.  
  10820. 0    belong&0377777777    042200413    a.out NetBSD/ns32532 demand paged
  10821. >0    byte            &0x80        
  10822. >>20    lelong            <4096        shared library
  10823. >>20    lelong            =4096        dynamically linked executable
  10824. >>20    lelong            >4096        dynamically linked executable
  10825. >0    byte            ^0x80        executable
  10826. >16    lelong            >0        not stripped
  10827. 0    belong&0377777777    042200410    a.out NetBSD/ns32532 pure
  10828. >0    byte            &0x80        dynamically linked executable
  10829. >0    byte            ^0x80        executable
  10830. >16    lelong            >0        not stripped
  10831. 0    belong&0377777777    042200407    a.out NetBSD/ns32532
  10832. >0    byte            &0x80        dynamically linked executable
  10833. >0    byte            ^0x80
  10834. >>0    byte            &0x40        position independent
  10835. >>20    lelong            !0        executable
  10836. >>20    lelong            =0        object file
  10837. >16    lelong            >0        not stripped
  10838. 0    belong&0377777777    042200507    a.out NetBSD/ns32532 core
  10839. >12    string            >\0        from '%s'
  10840. >32    lelong            !0        (signal %d)
  10841.  
  10842. 0    belong&0377777777    045200507    a.out NetBSD/powerpc core
  10843. >12    string            >\0        from '%s'
  10844.  
  10845. 0    belong&0377777777    042400413    a.out NetBSD/sparc demand paged
  10846. >0    byte            &0x80        
  10847. >>20    belong            <8192        shared library
  10848. >>20    belong            =8192        dynamically linked executable
  10849. >>20    belong            >8192        dynamically linked executable
  10850. >0    byte            ^0x80        executable
  10851. >16    belong            >0        not stripped
  10852. 0    belong&0377777777    042400410    a.out NetBSD/sparc pure
  10853. >0    byte            &0x80        dynamically linked executable
  10854. >0    byte            ^0x80        executable
  10855. >16    belong            >0        not stripped
  10856. 0    belong&0377777777    042400407    a.out NetBSD/sparc
  10857. >0    byte            &0x80        dynamically linked executable
  10858. >0    byte            ^0x80
  10859. >>0    byte            &0x40        position independent
  10860. >>20    belong            !0        executable
  10861. >>20    belong            =0        object file
  10862. >16    belong            >0        not stripped
  10863. 0    belong&0377777777    042400507    a.out NetBSD/sparc core
  10864. >12    string            >\0        from '%s'
  10865. >32    belong            !0        (signal %d)
  10866.  
  10867. 0    belong&0377777777    042600413    a.out NetBSD/pmax demand paged
  10868. >0    byte            &0x80        
  10869. >>20    lelong            <4096        shared library
  10870. >>20    lelong            =4096        dynamically linked executable
  10871. >>20    lelong            >4096        dynamically linked executable
  10872. >0    byte            ^0x80        executable
  10873. >16    lelong            >0        not stripped
  10874. 0    belong&0377777777    042600410    a.out NetBSD/pmax pure
  10875. >0    byte            &0x80        dynamically linked executable
  10876. >0    byte            ^0x80        executable
  10877. >16    lelong            >0        not stripped
  10878. 0    belong&0377777777    042600407    a.out NetBSD/pmax
  10879. >0    byte            &0x80        dynamically linked executable
  10880. >0    byte            ^0x80
  10881. >>0    byte            &0x40        position independent
  10882. >>20    lelong            !0        executable
  10883. >>20    lelong            =0        object file
  10884. >16    lelong            >0        not stripped
  10885. 0    belong&0377777777    042600507    a.out NetBSD/pmax core
  10886. >12    string            >\0        from '%s'
  10887. >32    lelong            !0        (signal %d)
  10888.  
  10889. 0    belong&0377777777    043000413    a.out NetBSD/vax 1k demand paged
  10890. >0    byte            &0x80        
  10891. >>20    lelong            <4096        shared library
  10892. >>20    lelong            =4096        dynamically linked executable
  10893. >>20    lelong            >4096        dynamically linked executable
  10894. >0    byte            ^0x80        executable
  10895. >16    lelong            >0        not stripped
  10896. 0    belong&0377777777    043000410    a.out NetBSD/vax 1k pure
  10897. >0    byte            &0x80        dynamically linked executable
  10898. >0    byte            ^0x80        executable
  10899. >16    lelong            >0        not stripped
  10900. 0    belong&0377777777    043000407    a.out NetBSD/vax 1k
  10901. >0    byte            &0x80        dynamically linked executable
  10902. >0    byte            ^0x80
  10903. >>0    byte            &0x40        position independent
  10904. >>20    lelong            !0        executable
  10905. >>20    lelong            =0        object file
  10906. >16    lelong            >0        not stripped
  10907. 0    belong&0377777777    043000507    a.out NetBSD/vax 1k core
  10908. >12    string            >\0        from '%s'
  10909. >32    lelong            !0        (signal %d)
  10910.  
  10911. 0    belong&0377777777    045400413    a.out NetBSD/vax 4k demand paged
  10912. >0    byte            &0x80        
  10913. >>20    lelong            <4096        shared library
  10914. >>20    lelong            =4096        dynamically linked executable
  10915. >>20    lelong            >4096        dynamically linked executable
  10916. >0    byte            ^0x80        executable
  10917. >16    lelong            >0        not stripped
  10918. 0    belong&0377777777    045400410    a.out NetBSD/vax 4k pure
  10919. >0    byte            &0x80        dynamically linked executable
  10920. >0    byte            ^0x80        executable
  10921. >16    lelong            >0        not stripped
  10922. 0    belong&0377777777    045400407    a.out NetBSD/vax 4k
  10923. >0    byte            &0x80        dynamically linked executable
  10924. >0    byte            ^0x80
  10925. >>0    byte            &0x40        position independent
  10926. >>20    lelong            !0        executable
  10927. >>20    lelong            =0        object file
  10928. >16    lelong            >0        not stripped
  10929. 0    belong&0377777777    045400507    a.out NetBSD/vax 4k core
  10930. >12    string            >\0        from '%s'
  10931. >32    lelong            !0        (signal %d)
  10932.  
  10933. # NetBSD/alpha does not support (and has never supported) a.out objects,
  10934. # so no rules are provided for them.  NetBSD/alpha ELF objects are 
  10935. # dealt with in "elf".
  10936. 0    lelong        0x00070185        ECOFF NetBSD/alpha binary
  10937. >10    leshort        0x0001            not stripped
  10938. >10    leshort        0x0000            stripped
  10939. 0    belong&0377777777    043200507    a.out NetBSD/alpha core
  10940. >12    string            >\0        from '%s'
  10941. >32    lelong            !0        (signal %d)
  10942.  
  10943. 0    belong&0377777777    043400413    a.out NetBSD/mips demand paged
  10944. >0    byte            &0x80        
  10945. >>20    belong            <8192        shared library
  10946. >>20    belong            =8192        dynamically linked executable
  10947. >>20    belong            >8192        dynamically linked executable
  10948. >0    byte            ^0x80        executable
  10949. >16    belong            >0        not stripped
  10950. 0    belong&0377777777    043400410    a.out NetBSD/mips pure
  10951. >0    byte            &0x80        dynamically linked executable
  10952. >0    byte            ^0x80        executable
  10953. >16    belong            >0        not stripped
  10954. 0    belong&0377777777    043400407    a.out NetBSD/mips
  10955. >0    byte            &0x80        dynamically linked executable
  10956. >0    byte            ^0x80
  10957. >>0    byte            &0x40        position independent
  10958. >>20    belong            !0        executable
  10959. >>20    belong            =0        object file
  10960. >16    belong            >0        not stripped
  10961. 0    belong&0377777777    043400507    a.out NetBSD/mips core
  10962. >12    string            >\0        from '%s'
  10963. >32    belong            !0        (signal %d)
  10964.  
  10965. 0    belong&0377777777    043600413    a.out NetBSD/arm32 demand paged
  10966. >0    byte            &0x80
  10967. >>20    lelong            <4096        shared library
  10968. >>20    lelong            =4096        dynamically linked executable
  10969. >>20    lelong            >4096        dynamically linked executable
  10970. >0    byte            ^0x80        executable
  10971. >16    lelong            >0        not stripped
  10972. 0    belong&0377777777    043600410    a.out NetBSD/arm32 pure
  10973. >0    byte            &0x80        dynamically linked executable
  10974. >0    byte            ^0x80        executable
  10975. >16    lelong            >0        not stripped
  10976. 0    belong&0377777777    043600407    a.out NetBSD/arm32
  10977. >0    byte            &0x80        dynamically linked executable
  10978. >0    byte            ^0x80
  10979. >>0    byte            &0x40        position independent
  10980. >>20    lelong            !0        executable
  10981. >>20    lelong            =0        object file
  10982. >16    lelong            >0        not stripped
  10983. # NetBSD/arm26 has always used ELF objects, but it shares a core file
  10984. # format with NetBSD/arm32.
  10985. 0    belong&0377777777    043600507    a.out NetBSD/arm core
  10986. >12    string            >\0        from '%s'
  10987. >32    lelong            !0        (signal %d)
  10988.  
  10989. #------------------------------------------------------------------------------
  10990. # netscape:  file(1) magic for Netscape files
  10991. # "H. Nanosecond" <aldomel@ix.netcom.com>
  10992. # version 3 and 4 I think
  10993. #
  10994.  
  10995. # Netscape Address book  .nab
  10996. 0    string \000\017\102\104\000\000\000\000\000\000\001\000\000\000\000\002\000\000\000\002\000\000\004\000 Netscape Address book
  10997.  
  10998. # Netscape Communicator address book
  10999. 0   string   \000\017\102\111 Netscape Communicator address book
  11000.  
  11001. # .snm Caches
  11002. 0    string        #\ Netscape\ folder\ cache    Netscape folder cache
  11003. 0    string    \000\036\204\220\000    Netscape folder cache
  11004. # .n2p 
  11005. # Net 2 Phone 
  11006. #0    string    123\130\071\066\061\071\071\071\060\070\061\060\061\063\060
  11007. 0    string    SX961999    Net2phone
  11008.  
  11009. #
  11010. #This is files ending in .art, FIXME add more rules
  11011. 0       string          JG\004\016\0\0\0\0      ART
  11012.  
  11013. #------------------------------------------------------------------------------
  11014. # netware:  file(1) magic for NetWare Loadable Modules (NLMs)
  11015. # From: Mads Martin Joergensen <mmj@suse.de>
  11016.  
  11017. 0    string    NetWare\ Loadable\ Module    NetWare Loadable Module
  11018.  
  11019. #------------------------------------------------------------------------------
  11020. # news:  file(1) magic for SunOS NeWS fonts (not "news" as in "netnews")
  11021. #
  11022. 0    string        StartFontMetrics    ASCII font metrics
  11023. 0    string        StartFont    ASCII font bits
  11024. 0    belong        0x137A2944    NeWS bitmap font
  11025. 0    belong        0x137A2947    NeWS font family
  11026. 0    belong        0x137A2950    scalable OpenFont binary
  11027. 0    belong        0x137A2951    encrypted scalable OpenFont binary
  11028. 8    belong        0x137A2B45    X11/NeWS bitmap font
  11029. 8    belong        0x137A2B48    X11/NeWS font family
  11030. #------------------------------------------------------------------------------
  11031. # nitpicker:  file(1) magic for Flowfiles.
  11032. # From: Christian Jachmann <C.Jachmann@gmx.net> http://www.nitpicker.de
  11033. 0    string    NPFF    NItpicker Flow File 
  11034. >4    byte    x    V%d.
  11035. >5    byte    x    %d
  11036. >6    bedate    x    started: %s
  11037. >10    bedate    x    stopped: %s
  11038. >14    belong    x    Bytes: %u
  11039. >18    belong    x    Bytes1: %u
  11040. >22    belong    x    Flows: %u
  11041. >26    belong    x    Pkts: %u
  11042.  
  11043. #------------------------------------------------------------------------------
  11044. # ocaml: file(1) magic for Objective Caml files.
  11045. 0    string    Caml1999    Objective caml
  11046. >8    string    X        exec file
  11047. >8    string    I        interface file (.cmi)
  11048. >8    string    O        object file (.cmo)
  11049. >8    string    A        library file (.cma)
  11050. >8    string    Y        native object file (.cmx)
  11051. >8    string    Z        native library file (.cmxa)
  11052. >8    string    M        abstract syntax tree implementation file
  11053. >8    string    N        abstract syntax tree interface file
  11054. >9    string    >\0        (Version %3.3s).
  11055. #------------------------------------------------------------------------------
  11056. # octave binary data file(1) magic, from Dirk Eddelbuettel <edd@debian.org>
  11057. 0    string        Octave-1-L    Octave binary data (little endian)
  11058. 0    string        Octave-1-B    Octave binary data (big endian)
  11059.  
  11060. #------------------------------------------------------------------------------
  11061. # Microsoft OLE 2 Compound Documents : file(1) magic for Microsoft Structured
  11062. # storage (http://en.wikipedia.org/wiki/Structured_Storage)
  11063. # Additional tests for OLE 2 Compound Documents should be under this recipe.
  11064.  
  11065. 0   string  \320\317\021\340\241\261\032\341      OLE 2 Compound Document
  11066. # - Microstation V8 DGN files (www.bentley.com)
  11067. #   Last update on 10/23/2006 by Lester Hightower
  11068. > 0x480  string  D\000g\000n\000~\000H                : Microstation V8 DGN
  11069. # - Visio documents
  11070. #   Last update on 10/23/2006 by Lester Hightower
  11071. > 0x480  string  V\000i\000s\000i\000o\000D\000o\000c : Visio Document
  11072.  
  11073. #------------------------------------------------------------------------------
  11074. # olf:  file(1) magic for OLF executables
  11075. #
  11076. # We have to check the byte order flag to see what byte order all the
  11077. # other stuff in the header is in.
  11078. #
  11079. # MIPS R3000 may also be for MIPS R2000.
  11080. # What're the correct byte orders for the nCUBE and the Fujitsu VPP500?
  11081. #
  11082. # Created by Erik Theisen <etheisen@openbsd.org>
  11083. # Based on elf from Daniel Quinlan <quinlan@yggdrasil.com>
  11084. 0    string        \177OLF        OLF
  11085. >4    byte        0        invalid class
  11086. >4    byte        1        32-bit
  11087. >4    byte        2        64-bit
  11088. >7    byte        0        invalid os
  11089. >7    byte        1        OpenBSD
  11090. >7    byte        2        NetBSD
  11091. >7    byte        3        FreeBSD
  11092. >7    byte        4        4.4BSD
  11093. >7    byte        5        Linux
  11094. >7    byte        6        SVR4
  11095. >7    byte        7        esix
  11096. >7    byte        8        Solaris
  11097. >7    byte        9        Irix
  11098. >7    byte        10        SCO
  11099. >7    byte        11        Dell
  11100. >7    byte        12        NCR
  11101. >5    byte        0        invalid byte order
  11102. >5    byte        1        LSB
  11103. >>16    leshort        0        no file type,
  11104. >>16    leshort        1        relocatable,
  11105. >>16    leshort        2        executable,
  11106. >>16    leshort        3        shared object,
  11107. # Core handling from Peter Tobias <tobias@server.et-inf.fho-emden.de>
  11108. # corrections by Christian 'Dr. Disk' Hechelmann <drdisk@ds9.au.s.shuttle.de>
  11109. >>16    leshort        4        core file
  11110. >>>(0x38+0xcc) string    >\0        of '%s'
  11111. >>>(0x38+0x10) lelong    >0        (signal %d),
  11112. >>16    leshort        &0xff00        processor-specific,
  11113. >>18    leshort        0        no machine,
  11114. >>18    leshort        1        AT&T WE32100 - invalid byte order,
  11115. >>18    leshort        2        SPARC - invalid byte order,
  11116. >>18    leshort        3        Intel 80386,
  11117. >>18    leshort        4        Motorola 68000 - invalid byte order,
  11118. >>18    leshort        5        Motorola 88000 - invalid byte order,
  11119. >>18    leshort        6        Intel 80486,
  11120. >>18    leshort        7        Intel 80860,
  11121. >>18    leshort        8        MIPS R3000_BE - invalid byte order,
  11122. >>18    leshort        9        Amdahl - invalid byte order,
  11123. >>18    leshort        10        MIPS R3000_LE,
  11124. >>18    leshort        11        RS6000 - invalid byte order,
  11125. >>18    leshort        15        PA-RISC - invalid byte order,
  11126. >>18    leshort        16        nCUBE,
  11127. >>18    leshort        17        VPP500,
  11128. >>18    leshort        18        SPARC32PLUS,
  11129. >>18    leshort        20        PowerPC,
  11130. >>18    leshort        0x9026        Alpha,
  11131. >>20    lelong        0        invalid version
  11132. >>20    lelong        1        version 1
  11133. >>36    lelong        1        MathCoPro/FPU/MAU Required
  11134. >8    string        >\0        (%s)
  11135. >5    byte        2        MSB
  11136. >>16    beshort        0        no file type,
  11137. >>16    beshort        1        relocatable,
  11138. >>16    beshort        2        executable,
  11139. >>16    beshort        3        shared object,
  11140. >>16    beshort        4        core file,
  11141. >>>(0x38+0xcc) string    >\0        of '%s'
  11142. >>>(0x38+0x10) belong    >0        (signal %d),
  11143. >>16    beshort        &0xff00        processor-specific,
  11144. >>18    beshort        0        no machine,
  11145. >>18    beshort        1        AT&T WE32100,
  11146. >>18    beshort        2        SPARC,
  11147. >>18    beshort        3        Intel 80386 - invalid byte order,
  11148. >>18    beshort        4        Motorola 68000,
  11149. >>18    beshort        5        Motorola 88000,
  11150. >>18    beshort        6        Intel 80486 - invalid byte order,
  11151. >>18    beshort        7        Intel 80860,
  11152. >>18    beshort        8        MIPS R3000_BE,
  11153. >>18    beshort        9        Amdahl,
  11154. >>18    beshort        10        MIPS R3000_LE - invalid byte order,
  11155. >>18    beshort        11        RS6000,
  11156. >>18    beshort        15        PA-RISC,
  11157. >>18    beshort        16        nCUBE,
  11158. >>18    beshort        17        VPP500,
  11159. >>18    beshort        18        SPARC32PLUS,
  11160. >>18    beshort        20        PowerPC or cisco 4500,
  11161. >>18    beshort        21        cisco 7500,
  11162. >>18    beshort        24        cisco SVIP,
  11163. >>18    beshort        25        cisco 7200,
  11164. >>18    beshort        36        cisco 12000,
  11165. >>18    beshort        0x9026        Alpha,
  11166. >>20    belong        0        invalid version
  11167. >>20    belong        1        version 1
  11168. >>36    belong        1        MathCoPro/FPU/MAU Required
  11169. #------------------------------------------------------------------------------
  11170. # os2:  file(1) magic for OS/2 files
  11171. #
  11172.  
  11173. # Provided 1998/08/22 by
  11174. # David Mediavilla <davidme.news@REMOVEIFNOTSPAMusa.net>
  11175. 1    search/1    InternetShortcut    MS Windows 95 Internet shortcut text
  11176. >24    search/1    >\             (URL=<%s>)
  11177.  
  11178. # OS/2 URL objects
  11179. # Provided 1998/08/22 by
  11180. # David Mediavilla <davidme.news@REMOVEIFNOTSPAMusa.net>
  11181. #0    string    http:            OS/2 URL object text
  11182. #>5    string    >\            (WWW) <http:%s>
  11183. #0    string    mailto:            OS/2 URL object text
  11184. #>7    string    >\            (email) <%s>
  11185. #0    string    news:            OS/2 URL object text
  11186. #>5    string    >\            (Usenet) <%s>
  11187. #0    string    ftp:            OS/2 URL object text
  11188. #>4    string    >\            (FTP) <ftp:%s>
  11189. #0    string    file:            OS/2 URL object text
  11190. #>5    string    >\            (Local file) <%s>
  11191.  
  11192. # >>>>> OS/2 INF/HLP <<<<<  (source: Daniel Dissett ddissett@netcom.com)
  11193. # Carl Hauser (chauser.parc@xerox.com) and 
  11194. # Marcus Groeber (marcusg@ph-cip.uni-koeln.de)
  11195. # list the following header format in inf02a.doc:
  11196. #
  11197. #  int16 ID;           // ID magic word (5348h = "HS")
  11198. #  int8  unknown1;     // unknown purpose, could be third letter of ID
  11199. #  int8  flags;        // probably a flag word...
  11200. #                      //  bit 0: set if INF style file
  11201. #                      //  bit 4: set if HLP style file
  11202. #                      // patching this byte allows reading HLP files
  11203. #                      // using the VIEW command, while help files 
  11204. #                      // seem to work with INF settings here as well.
  11205. #  int16 hdrsize;      // total size of header
  11206. #  int16 unknown2;     // unknown purpose
  11207. 0   string  HSP\x01\x9b\x00 OS/2 INF
  11208. >107 string >0                      (%s)
  11209. 0   string  HSP\x10\x9b\x00     OS/2 HLP
  11210. >107 string >0                      (%s)
  11211.  
  11212. # OS/2 INI (this is a guess)
  11213. 0  string   \xff\xff\xff\xff\x14\0\0\0  OS/2 INI
  11214. #------------------------------------------------------------------------------
  11215. # os400:  file(1) magic for IBM OS/400 files
  11216. #
  11217. # IBM OS/400 (i5/OS) Save file (SAVF) - gerardo.cacciari@gmail.com
  11218. # In spite of its quite variable format (due to internal memory page
  11219. # length differences between CISC and RISC versions of the OS) the
  11220. # SAVF structure hasn't suitable offsets to identify the catalog
  11221. # header in the first descriptor where there are some useful infos,
  11222. # so we must search in a somewhat large area for a particular string
  11223. # that represents the EBCDIC encoding of 'QSRDSSPC' (save/restore
  11224. # descriptor space) preceded by a two byte constant.
  11225. #
  11226. 1090     search/7393    \x19\xDB\xD8\xE2\xD9\xC4\xE2\xE2\xD7\xC3 IBM OS/400 save file data
  11227. >&212     byte        0x01             \b, created with SAVOBJ
  11228. >&212     byte        0x02             \b, created with SAVLIB
  11229. >&212     byte        0x07             \b, created with SAVCFG
  11230. >&212     byte        0x08             \b, created with SAVSECDTA
  11231. >&212     byte        0x0A             \b, created with SAVSECDTA
  11232. >&212     byte        0x0B             \b, created with SAVDLO
  11233. >&212     byte        0x0D             \b, created with SAVLICPGM
  11234. >&212     byte        0x11             \b, created with SAVCHGOBJ
  11235. >&213     byte        0x44             \b, at least V5R4 to open
  11236. >&213     byte        0x43             \b, at least V5R3 to open
  11237. >&213     byte        0x42             \b, at least V5R2 to open
  11238. >&213     byte        0x41             \b, at least V5R1 to open
  11239. >&213     byte        0x40             \b, at least V4R5 to open
  11240. >&213     byte        0x3F             \b, at least V4R4 to open
  11241. >&213     byte        0x3E             \b, at least V4R3 to open
  11242. >&213     byte        0x3C             \b, at least V4R2 to open
  11243. >&213     byte        0x3D             \b, at least V4R1M4 to open
  11244. >&213     byte        0x3B             \b, at least V4R1 to open
  11245. >&213     byte        0x3A             \b, at least V3R7 to open
  11246. >&213     byte        0x35             \b, at least V3R6 to open
  11247. >&213     byte        0x36             \b, at least V3R2 to open
  11248. >&213     byte        0x34             \b, at least V3R1 to open
  11249. >&213     byte        0x31             \b, at least V3R0M5 to open
  11250. >&213     byte        0x30             \b, at least V2R3 to open
  11251. #
  11252. # Copyright (c) 1996 Ignatios Souvatzis. All rights reserved.
  11253. #
  11254. # Redistribution and use in source and binary forms, with or without
  11255. # modification, are permitted provided that the following conditions
  11256. # are met:
  11257. # 1. Redistributions of source code must retain the above copyright
  11258. #    notice, this list of conditions and the following disclaimer.
  11259. # 2. Redistributions in binary form must reproduce the above copyright
  11260. #    notice, this list of conditions and the following disclaimer in the
  11261. #    documentation and/or other materials provided with the distribution.
  11262. # 3. All advertising materials mentioning features or use of this software
  11263. #    must display the following acknowledgement:
  11264. #      This product includes software developed by Ignatios Souvatzis for
  11265. #      the NetBSD project.
  11266. # 4. The name of the author may not be used to endorse or promote products
  11267. #    derived from this software without specific prior written permission.
  11268. #
  11269. #
  11270. # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  11271. # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  11272. # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  
  11273. # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  11274. # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  11275. # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  11276. # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  11277. # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  11278. # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  11279. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  11280. #
  11281. #
  11282. #
  11283. # OS9/6809 module descriptions:
  11284. #
  11285. 0    beshort        0x87CD    OS9/6809 module:
  11286. #
  11287. >6    byte&0x0f    0x00    non-executable
  11288. >6    byte&0x0f    0x01    machine language
  11289. >6    byte&0x0f    0x02    BASIC I-code
  11290. >6    byte&0x0f    0x03    Pascal P-code
  11291. >6    byte&0x0f    0x04    C I-code
  11292. >6    byte&0x0f    0x05    COBOL I-code
  11293. >6    byte&0x0f    0x06    Fortran I-code
  11294. #
  11295. >6    byte&0xf0    0x10    program executable
  11296. >6    byte&0xf0    0x20    subroutine
  11297. >6    byte&0xf0    0x30    multi-module
  11298. >6    byte&0xf0    0x40    data module
  11299. #
  11300. >6    byte&0xf0    0xC0    system module
  11301. >6    byte&0xf0    0xD0    file manager
  11302. >6    byte&0xf0    0xE0    device driver
  11303. >6    byte&0xf0    0xF0    device descriptor
  11304. #
  11305. # OS9/m68k stuff (to be continued)
  11306. #
  11307. 0    beshort        0x4AFC    OS9/68K module:
  11308. #
  11309. # attr
  11310. >0x14    byte&0x80    0x80    re-entrant
  11311. >0x14    byte&0x40    0x40    ghost
  11312. >0x14    byte&0x20    0x20    system-state
  11313. #
  11314. # lang:
  11315. #
  11316. >0x13    byte        1    machine language
  11317. >0x13    byte        2    BASIC I-code
  11318. >0x13    byte        3    Pascal P-code
  11319. >0x13    byte        4    C I-code
  11320. >0x13    byte        5    COBOL I-code
  11321. >0x13    byte        6    Fortran I-code
  11322. #
  11323. #
  11324. # type:
  11325. #
  11326. >0x12    byte        1    program executable
  11327. >0x12    byte        2    subroutine
  11328. >0x12    byte        3    multi-module
  11329. >0x12    byte        4    data module
  11330. >0x12    byte        11    trap library
  11331. >0x12    byte        12    system module
  11332. >0x12    byte        13    file manager
  11333. >0x12    byte        14    device driver
  11334. >0x12    byte        15    device descriptor
  11335. #
  11336. # Mach magic number info
  11337. #
  11338. 0    long        0xefbe    OSF/Rose object
  11339. # I386 magic number info
  11340. #
  11341. 0    short        0565    i386 COFF object
  11342.  
  11343. #------------------------------------------------------------------------------
  11344. # palm:  file(1) magic for PalmOS {.prc,.pdb}: applications, docfiles, and hacks
  11345. #
  11346. # Brian Lalor <blalor@hcirisc.cs.binghamton.edu>
  11347.  
  11348. # appl
  11349. 60      belong                  0x6170706c      PalmOS application
  11350. >0      string                  >\0             "%s"
  11351. # TEXt
  11352. 60      belong                  0x54455874      AportisDoc file
  11353. >0      string                  >\0             "%s"
  11354. # HACK
  11355. 60      belong                  0x4841434b      HackMaster hack
  11356. >0      string                  >\0             "%s"
  11357.  
  11358. # Variety of PalmOS document types
  11359. # Michael-John Turner <mj@debian.org>
  11360. # Thanks to Hasan Umit Ezerce <humit@tr-net.net.tr> for his DocType
  11361. 60    string                    BVokBDIC    BDicty PalmOS document
  11362. >0    string                  >\0             "%s"
  11363. 60    string                    DB99DBOS    DB PalmOS document
  11364. >0    string                  >\0             "%s"
  11365. 60    string                    vIMGView    FireViewer/ImageViewer PalmOS document
  11366. >0    string                  >\0             "%s"
  11367. 60    string                    PmDBPmDB    HanDBase PalmOS document
  11368. >0    string                  >\0             "%s"
  11369. 60    string                    InfoINDB    InfoView PalmOS document
  11370. >0    string                  >\0             "%s"
  11371. 60    string                    ToGoToGo    iSilo PalmOS document
  11372. >0    string                  >\0             "%s"
  11373. 60    string                    JfDbJBas    JFile PalmOS document
  11374. >0    string                  >\0             "%s"
  11375. 60    string                    JfDbJFil    JFile Pro PalmOS document
  11376. >0    string                  >\0             "%s"
  11377. 60    string                    DATALSdb    List PalmOS document
  11378. >0    string                  >\0             "%s"
  11379. 60    string                    Mdb1Mdb1    MobileDB PalmOS document
  11380. >0    string                  >\0             "%s"
  11381. 60    string                    PNRdPPrs    PeanutPress PalmOS document
  11382. >0    string                  >\0             "%s"
  11383. 60    string                    DataPlkr    Plucker PalmOS document
  11384. >0    string                  >\0             "%s"
  11385. 60    string                    DataSprd    QuickSheet PalmOS document
  11386. >0    string                  >\0             "%s"
  11387. 60    string                    SM01SMem    SuperMemo PalmOS document
  11388. >0    string                  >\0             "%s"
  11389. 60    string                    TEXtTlDc    TealDoc PalmOS document
  11390. >0    string                  >\0             "%s"
  11391. 60    string                    InfoTlIf    TealInfo PalmOS document
  11392. >0    string                  >\0             "%s"
  11393. 60    string                    DataTlMl    TealMeal PalmOS document
  11394. >0    string                  >\0             "%s"
  11395. 60    string                    DataTlPt    TealPaint PalmOS document
  11396. >0    string                  >\0             "%s"
  11397. 60    string                    dataTDBP    ThinkDB PalmOS document
  11398. >0    string                  >\0             "%s"
  11399. 60    string                    TdatTide    Tides PalmOS document
  11400. >0    string                  >\0             "%s"
  11401. 60    string                    ToRaTRPW    TomeRaider PalmOS document
  11402. >0    string                  >\0             "%s"
  11403.  
  11404. # A GutenPalm zTXT etext for use on Palm Pilots (http://gutenpalm.sf.net)
  11405. # For version 1.xx zTXTs, outputs version and numbers of bookmarks and
  11406. #   annotations.
  11407. # For other versions, just outputs version.
  11408. #
  11409. 60        string        zTXT        A GutenPalm zTXT e-book
  11410. >0        string        >\0        "%s"
  11411. >(0x4E.L)    byte        0
  11412. >>(0x4E.L+1)    byte        x        (v0.%02d)
  11413. >(0x4E.L)    byte        1
  11414. >>(0x4E.L+1)    byte        x        (v1.%02d)
  11415. >>>(0x4E.L+10)    beshort        >0
  11416. >>>>(0x4E.L+10) beshort        <2        - 1 bookmark
  11417. >>>>(0x4E.L+10) beshort        >1        - %d bookmarks
  11418. >>>(0x4E.L+14)    beshort        >0
  11419. >>>>(0x4E.L+14) beshort        <2        - 1 annotation
  11420. >>>>(0x4E.L+14) beshort        >1        - %d annotations
  11421. >(0x4E.L)    byte        >1        (v%d.
  11422. >>(0x4E.L+1)    byte        x        %02d)
  11423.  
  11424. # Palm OS .prc file types
  11425. 60        string        libr        Palm OS dynamic library data
  11426. >0        string        >\0        "%s"
  11427. 60        string        ptch        Palm OS operating system patch data
  11428. >0        string        >\0        "%s"
  11429.  
  11430. # Mobipocket (www.mobipocket.com), donated by Carl Witty
  11431. 60    string                    BOOKMOBI    Mobipocket E-book
  11432. >0    string                  >\0             "%s"
  11433.  
  11434. #------------------------------------------------------------------------------
  11435. #
  11436. # Parix COFF executables
  11437. # From: Ignatios Souvatzis <ignatios@cs.uni-bonn.de>
  11438. #
  11439. 0    beshort&0xfff    0xACE    PARIX
  11440. >0    byte&0xf0    0x80    T800
  11441. >0    byte&0xf0    0x90    T9000
  11442. >19    byte&0x02    0x02    executable
  11443. >19    byte&0x02    0x00    object
  11444. >19    byte&0x0c    0x00    not stripped
  11445.  
  11446. #------------------------------------------------------------------------------
  11447. # pbm:  file(1) magic for Portable Bitmap files
  11448. #
  11449. # XXX - byte order?
  11450. #
  11451. 0    short    0x2a17    "compact bitmap" format (Poskanzer)
  11452. #------------------------------------------------------------------------------
  11453. # pdf:  file(1) magic for Portable Document Format
  11454. #
  11455.  
  11456. 0    string        %PDF-        PDF document
  11457. !:mime    application/pdf
  11458. >5    byte        x        \b, version %c
  11459. >7    byte        x        \b.%c
  11460.  
  11461. # From: Nick Schmalenberger <nick@schmalenberger.us>
  11462. # Forms Data Format
  11463. 0       string          %FDF-           FDF document
  11464. >5      byte            x               \b, version %c
  11465. >7      byte            x               \b.%c
  11466.  
  11467. #------------------------------------------------------------------------------
  11468. # pdp:  file(1) magic for PDP-11 executable/object and APL workspace
  11469. #
  11470. 0    lelong        0101555        PDP-11 single precision APL workspace
  11471. 0    lelong        0101554        PDP-11 double precision APL workspace
  11472. #
  11473. # PDP-11 a.out
  11474. #
  11475. 0    leshort        0407        PDP-11 executable
  11476. >8    leshort        >0        not stripped
  11477. >15    byte        >0        - version %ld
  11478.  
  11479. 0    leshort        0401        PDP-11 UNIX/RT ldp
  11480. 0    leshort        0405        PDP-11 old overlay
  11481.  
  11482. 0    leshort        0410        PDP-11 pure executable
  11483. >8    leshort        >0        not stripped
  11484. >15    byte        >0        - version %ld
  11485.  
  11486. 0    leshort        0411        PDP-11 separate I&D executable
  11487. >8    leshort        >0        not stripped
  11488. >15    byte        >0        - version %ld
  11489.  
  11490. 0    leshort        0437        PDP-11 kernel overlay
  11491.  
  11492. # These last three are derived from 2.11BSD file(1)
  11493. 0    leshort        0413        PDP-11 demand-paged pure executable
  11494. >8    leshort        >0        not stripped
  11495.  
  11496. 0    leshort        0430        PDP-11 overlaid pure executable
  11497. >8    leshort        >0        not stripped
  11498.  
  11499. 0    leshort        0431        PDP-11 overlaid separate executable
  11500. >8    leshort        >0        not stripped
  11501. #------------------------------------------------------------------------------
  11502. # perl:  file(1) magic for Larry Wall's perl language.
  11503. #
  11504. # The `eval' lines recognizes an outrageously clever hack.
  11505. # Keith Waclena <keith@cerberus.uchicago.edu>
  11506. # Send additions to <perl5-porters@perl.org>
  11507. 0    search/1/b    #!\ /bin/perl            Perl script text executable
  11508. !:mime    application/x-perl
  11509. 0    search/1    eval\ "exec\ /bin/perl        Perl script text
  11510. !:mime    application/x-perl
  11511. 0    search/1/b    #!\ /usr/bin/perl        Perl script text executable
  11512. !:mime    application/x-perl
  11513. 0    search/1    eval\ "exec\ /usr/bin/perl    Perl script text
  11514. !:mime    application/x-perl
  11515. 0    search/1/b    #!\ /usr/local/bin/perl        Perl script text executable
  11516. !:mime    application/x-perl
  11517. 0    search/1    eval\ "exec\ /usr/local/bin/perl    Perl script text
  11518. !:mime    application/x-perl
  11519. 0    search/1    eval\ '(exit\ $?0)'\ &&\ eval\ 'exec    Perl script text
  11520. !:mime    application/x-perl
  11521.  
  11522.  
  11523. # by Dmitry V. Levin and Alexey Tourbin
  11524. # check the first line
  11525. 0    search/1    package
  11526. 0    regex        \^package[\ \t]+[A-Za-z_]
  11527. >0    regex        \^package[\ \t]+[0-9A-Za-z_:]+\ *;    Perl5 module source text
  11528. # not 'p', check other lines
  11529. 0    search/1    !p
  11530. >0    regex        \^package[\ \t]+[0-9A-Za-z_:]+\ *;
  11531. >>0    regex        \^1\ *;|\^(use|sub|my)\ .*[(;{=]    Perl5 module source text
  11532.  
  11533.  
  11534.  
  11535. # Perl POD documents
  11536. # From: Tom Hukins <tom@eborcom.com>
  11537. 0    search/1/B    \=pod\n        Perl POD document text
  11538. 0    search/1/B    \n\=pod\n    Perl POD document text
  11539. 0    search/1/B    \=head1\     Perl POD document text
  11540. 0    search/1/B    \n\=head1\     Perl POD document text
  11541. 0    search/1/B    \=head2\     Perl POD document text
  11542. 0    search/1/B    \n\=head2\     Perl POD document text
  11543.  
  11544. # Perl Storable data files.
  11545. 0    string    perl-store    perl Storable (v0.6) data
  11546. >4    byte    >0    (net-order %d)
  11547. >>4    byte    &01    (network-ordered)
  11548. >>4    byte    =3    (major 1)
  11549. >>4    byte    =2    (major 1)
  11550.  
  11551. 0    string    pst0    perl Storable (v0.7) data
  11552. >4    byte    >0
  11553. >>4    byte    &01    (network-ordered)
  11554. >>4    byte    =5    (major 2)
  11555. >>4    byte    =4    (major 2)
  11556. >>5    byte    >0    (minor %d)
  11557.  
  11558. #------------------------------------------------------------------------------
  11559. # pgp:  file(1) magic for Pretty Good Privacy
  11560. # see http://lists.gnupg.org/pipermail/gnupg-devel/1999-September/016052.html
  11561. #
  11562. 0       beshort         0x9900                  PGP key public ring
  11563. !:mime    application/x-pgp-keyring
  11564. 0       beshort         0x9501                  PGP key security ring
  11565. !:mime    application/x-pgp-keyring
  11566. 0       beshort         0x9500                  PGP key security ring
  11567. !:mime    application/x-pgp-keyring
  11568. 0    beshort        0xa600            PGP encrypted data
  11569. #!:mime    application/pgp-encrypted
  11570. #0    string        -----BEGIN\040PGP    text/PGP armored data
  11571. !:mime    text/PGP # encoding: armored data
  11572. #>15    string    PUBLIC\040KEY\040BLOCK-    public key block
  11573. #>15    string    MESSAGE-        message
  11574. #>15    string    SIGNED\040MESSAGE-    signed message
  11575. #>15    string    PGP\040SIGNATURE-    signature
  11576.  
  11577. 2    string    ---BEGIN\ PGP\ PUBLIC\ KEY\ BLOCK-    PGP public key block
  11578. !:mime    application/pgp-keys
  11579. 0    string    -----BEGIN\040PGP\40MESSAGE-        PGP message
  11580. !:mime    application/pgp
  11581. 0    string    -----BEGIN\040PGP\40SIGNATURE-        PGP signature
  11582. !:mime    application/pgp-signature
  11583.  
  11584. #------------------------------------------------------------------------------
  11585. # pkgadd:  file(1) magic for SysV R4 PKG Datastreams
  11586. #
  11587. 0       string          #\ PaCkAgE\ DaTaStReAm  pkg Datastream (SVR4)
  11588. !:mime    application/x-svr4-package
  11589.  
  11590. #------------------------------------------------------------------------------
  11591. # plan9:  file(1) magic for AT&T Bell Labs' Plan 9 executables
  11592. # From: "Stefan A. Haubenthal" <polluks@web.de>
  11593. #
  11594. 0    belong        0x00000107    Plan 9 executable, Motorola 68k
  11595. 0    belong        0x000001EB    Plan 9 executable, Intel 386
  11596. 0    belong        0x00000247    Plan 9 executable, Intel 960
  11597. 0    belong        0x000002AB    Plan 9 executable, SPARC
  11598. 0    belong        0x00000407    Plan 9 executable, MIPS R3000
  11599. 0    belong        0x0000048B    Plan 9 executable, AT&T DSP 3210
  11600. 0    belong        0x00000517    Plan 9 executable, MIPS R4000 BE
  11601. 0    belong        0x000005AB    Plan 9 executable, AMD 29000
  11602. 0    belong        0x00000647    Plan 9 executable, ARM 7-something
  11603. 0    belong        0x000006EB    Plan 9 executable, PowerPC
  11604. 0    belong        0x00000797    Plan 9 executable, MIPS R4000 LE
  11605. 0    belong        0x0000084B    Plan 9 executable, DEC Alpha
  11606.  
  11607. #------------------------------------------------------------------------------
  11608. # plus5:  file(1) magic for Plus Five's UNIX MUMPS
  11609. #
  11610. # XXX - byte order?  Paging Hokey....
  11611. #
  11612. 0    short        0x259        mumps avl global
  11613. >2    byte        >0        (V%d)
  11614. >6    byte        >0        with %d byte name
  11615. >7    byte        >0        and %d byte data cells
  11616. 0    short        0x25a        mumps blt global
  11617. >2    byte        >0        (V%d)
  11618. >8    short        >0        - %d byte blocks
  11619. >15    byte        0x00        - P/D format
  11620. >15    byte        0x01        - P/K/D format
  11621. >15    byte        0x02        - K/D format
  11622. >15    byte        >0x02        - Bad Flags
  11623.  
  11624. #------------------------------------------------------------------------------
  11625. # printer:  file(1) magic for printer-formatted files
  11626. #
  11627.  
  11628. # PostScript, updated by Daniel Quinlan (quinlan@yggdrasil.com)
  11629. 0    string        %!        PostScript document text
  11630. !:mime    application/postscript
  11631. >2    string        PS-Adobe-    conforming
  11632. >>11    string        >\0        DSC level %.3s
  11633. >>>15    string        EPS        \b, type %s
  11634. >>>15    string        Query        \b, type %s
  11635. >>>15    string        ExitServer    \b, type %s
  11636. >>>15   search/1000        %%LanguageLevel:\ 
  11637. >>>>&0    string        >\0        \b, Level %s
  11638. # Some PCs have the annoying habit of adding a ^D as a document separator
  11639. 0    string        \004%!        PostScript document text
  11640. !:mime    application/postscript
  11641. >3    string        PS-Adobe-    conforming
  11642. >>12    string        >\0        DSC level %.3s
  11643. >>>16    string        EPS        \b, type %s
  11644. >>>16    string        Query        \b, type %s
  11645. >>>16    string        ExitServer    \b, type %s
  11646. >>>16   search/1000        %%LanguageLevel:\ 
  11647. >>>>&0    string        >\0        \b, Level %s
  11648. 0    string        \033%-12345X%!PS    PostScript document
  11649.  
  11650. # DOS EPS Binary File Header
  11651. # From: Ed Sznyter <ews@Black.Market.NET>
  11652. 0       belong          0xC5D0D3C6      DOS EPS Binary File
  11653. >4      long            >0              Postscript starts at byte %d
  11654. >>8     long            >0              length %d
  11655. >>>12   long            >0              Metafile starts at byte %d
  11656. >>>>16  long            >0              length %d
  11657. >>>20   long            >0              TIFF starts at byte %d
  11658. >>>>24  long            >0              length %d
  11659.  
  11660. # Adobe's PostScript Printer Description (PPD) files
  11661. #       Yves Arrouye <arrouye@marin.fdn.fr>
  11662. #
  11663. 0      string          *PPD-Adobe:    PPD file
  11664. >13    string          x              \b, ve
  11665.  
  11666. # HP Printer Job Language
  11667. 0    string        \033%-12345X@PJL    HP Printer Job Language data
  11668. # HP Printer Job Language
  11669. # The header found on Win95 HP plot files is the "Silliest Thing possible" 
  11670. # (TM)
  11671. # Every driver puts the language at some random position, with random case
  11672. # (LANGUAGE and Language)
  11673. # For example the LaserJet 5L driver puts the "PJL ENTER LANGUAGE" in line 10
  11674. # From: Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de>
  11675. 0    string        \033%-12345X@PJL    HP Printer Job Language data
  11676. >&0    string        >\0            %s            
  11677. >>&0    string        >\0            %s            
  11678. >>>&0    string        >\0            %s        
  11679. >>>>&0    string        >\0            %s        
  11680. #>15    string        \ ENTER\ LANGUAGE\ =
  11681. #>31    string        PostScript        PostScript
  11682.  
  11683. # HP Printer Control Language, Daniel Quinlan (quinlan@yggdrasil.com)
  11684. 0    string        \033E\033    HP PCL printer data
  11685. >3    string        \&l0A        - default page size
  11686. >3    string        \&l1A        - US executive page size
  11687. >3    string        \&l2A        - US letter page size
  11688. >3    string        \&l3A        - US legal page size
  11689. >3    string        \&l26A        - A4 page size
  11690. >3    string        \&l80A        - Monarch envelope size
  11691. >3    string        \&l81A        - No. 10 envelope size
  11692. >3    string        \&l90A        - Intl. DL envelope size
  11693. >3    string        \&l91A        - Intl. C5 envelope size
  11694. >3    string        \&l100A        - Intl. B5 envelope size
  11695. >3    string        \&l-81A        - No. 10 envelope size (landscape)
  11696. >3    string        \&l-90A        - Intl. DL envelope size (landscape)
  11697.  
  11698. # IMAGEN printer-ready files:
  11699. 0    string    @document(        Imagen printer
  11700. # this only works if "language xxx" is first item in Imagen header.
  11701. >10    string    language\ impress    (imPRESS data)
  11702. >10    string    language\ daisy        (daisywheel text)
  11703. >10    string    language\ diablo    (daisywheel text)
  11704. >10    string    language\ printer    (line printer emulation)
  11705. >10    string    language\ tektronix    (Tektronix 4014 emulation)
  11706. # Add any other languages that your Imagen uses - remember
  11707. # to keep the word `text' if the file is human-readable.
  11708. # [GRR 950115:  missing "postscript" or "ultrascript" (whatever it was called)]
  11709. #
  11710. # Now magic for IMAGEN font files...
  11711. 0    string        Rast        RST-format raster font data
  11712. >45    string        >0        face %s
  11713. # From Jukka Ukkonen
  11714. 0    string        \033[K\002\0\0\017\033(a\001\0\001\033(g    Canon Bubble Jet BJC formatted data
  11715.  
  11716. # From <mike@flyn.org>
  11717. # These are the /etc/magic entries to decode data sent to an Epson printer.
  11718. 0       string          \x1B\x40\x1B\x28\x52\x08\x00\x00REMOTE1P        Epson Stylus Color 460 data
  11719.  
  11720.  
  11721. #------------------------------------------------------------------------------
  11722. # zenographics:  file(1) magic for Zenographics ZjStream printer data
  11723. # Rick Richardson  rickr@mn.rr.com
  11724. 0    string        JZJZ
  11725. >0x12    string        ZZ        Zenographics ZjStream printer data (big-endian)
  11726. 0    string        ZJZJ
  11727. >0x12    string        ZZ        Zenographics ZjStream printer data (little-endian)
  11728.  
  11729.  
  11730. #------------------------------------------------------------------------------
  11731. # Oak Technologies printer stream
  11732. # Rick Richardson <rickr@mn.rr.com>
  11733. 0       string          OAK
  11734. >0x07    byte        0
  11735. >0x0b    byte        0    Oak Technologies printer stream
  11736.  
  11737. # This would otherwise be recognized as PostScript - nick@debian.org
  11738. 0    string        %!VMF         SunClock's Vector Map Format data
  11739.  
  11740. #------------------------------------------------------------------------------
  11741. # HP LaserJet 1000 series downloadable firmware file
  11742. 0    string    \xbe\xefABCDEFGH    HP LaserJet 1000 series downloadable firmware   
  11743.  
  11744. # From: Paolo <oopla@users.sf.net>
  11745. # Epson ESC/Page, ESC/PageColor 
  11746. 0    string    \x1b\x01@EJL    Epson ESC/Page language printer data
  11747.  
  11748. #------------------------------------------------------------------------------
  11749. # project:  file(1) magic for Project management
  11750. # Magic strings for ftnchek project files. Alexander Mai
  11751. 0    string    FTNCHEK_\ P    project file for ftnchek
  11752. >10    string    1        version 2.7
  11753. >10    string    2        version 2.8 to 2.10
  11754. >10    string    3        version 2.11 or later
  11755.  
  11756. #------------------------------------------------------------------------------
  11757. # psdbms:  file(1) magic for psdatabase
  11758. #
  11759. 0    belong&0xff00ffff    0x56000000    ps database
  11760. >1    string    >\0    version %s
  11761. >4    string    >\0    from kernel %s
  11762.  
  11763. #------------------------------------------------------------------------------
  11764. # psion:  file(1) magic for Psion handhelds data
  11765. # from: Peter Breitenlohner <peb@mppmu.mpg.de>
  11766. #
  11767. 0    lelong        0x10000037    Psion Series 5
  11768. >4    lelong        0x10000039    font file
  11769. >4    lelong        0x1000003A    printer driver
  11770. >4    lelong        0x1000003B    clipboard
  11771. >4    lelong        0x10000042    multi-bitmap image
  11772. >4    lelong        0x1000006A    application information file
  11773. >4    lelong        0x1000006D
  11774. >>8    lelong        0x1000007D    sketch image
  11775. >>8    lelong        0x1000007E    voice note
  11776. >>8    lelong        0x1000007F    word file
  11777. >>8    lelong        0x10000085    OPL program
  11778. >>8    lelong        0x10000088    sheet file
  11779. >>8    lelong        0x100001C4    EasyFax initialisation file
  11780. >4    lelong        0x10000073    OPO module
  11781. >4    lelong        0x10000074    OPL application
  11782. >4    lelong        0x1000008A    exported multi-bitmap image
  11783.  
  11784. 0    lelong        0x10000041    Psion Series 5 ROM multi-bitmap image
  11785.  
  11786. 0    lelong        0x10000050    Psion Series 5
  11787. >4    lelong        0x1000006D    database
  11788. >4    lelong        0x100000E4    ini file
  11789.  
  11790. 0    lelong        0x10000079    Psion Series 5 binary:
  11791. >4    lelong        0x00000000    DLL
  11792. >4    lelong        0x10000049    comms hardware library
  11793. >4    lelong        0x1000004A    comms protocol library
  11794. >4    lelong        0x1000005D    OPX
  11795. >4    lelong        0x1000006C    application
  11796. >4    lelong        0x1000008D    DLL
  11797. >4    lelong        0x100000AC    logical device driver
  11798. >4    lelong        0x100000AD    physical device driver
  11799. >4    lelong        0x100000E5    file transfer protocol
  11800. >4    lelong        0x100000E5    file transfer protocol
  11801. >4    lelong        0x10000140    printer definition
  11802. >4    lelong        0x10000141    printer definition
  11803.  
  11804. 0    lelong        0x1000007A    Psion Series 5 executable
  11805.  
  11806. #------------------------------------------------------------------------------
  11807. # pulsar:  file(1) magic for Pulsar POP3 daemon binary files
  11808. #
  11809. # http://pulsar.sourceforge.net
  11810. # mailto:rok.papez@lugos.si
  11811. #
  11812.  
  11813. 0    belong    0x1ee7f11e    Pulsar POP3 daemon mailbox cache file.
  11814. >4    ubelong    x        Version: %d.
  11815. >8    ubelong    x        \b%d
  11816.  
  11817.  
  11818. #------------------------------------------------------------------------------
  11819. # pyramid:  file(1) magic for Pyramids
  11820. #
  11821. # XXX - byte order?
  11822. #
  11823. 0    long        0x50900107    Pyramid 90x family executable
  11824. 0    long        0x50900108    Pyramid 90x family pure executable
  11825. >16    long        >0        not stripped
  11826. 0    long        0x5090010b    Pyramid 90x family demand paged pure executable
  11827. >16    long        >0        not stripped
  11828.  
  11829. #------------------------------------------------------------------------------
  11830. # python:  file(1) magic for python
  11831. #
  11832. # From: David Necas <yeti@physics.muni.cz>
  11833. # often the module starts with a multiline string
  11834. 0    string        """    a python script text executable
  11835. # MAGIC as specified in Python/import.c (1.5 to 2.3.0a)
  11836. # 20121  ( YEAR - 1995 ) + MONTH  + DAY (little endian followed by "\r\n"
  11837. 0    belong        0x994e0d0a    python 1.5/1.6 byte-compiled
  11838. 0    belong        0x87c60d0a    python 2.0 byte-compiled
  11839. 0    belong        0x2aeb0d0a    python 2.1 byte-compiled
  11840. 0    belong        0x2ded0d0a    python 2.2 byte-compiled
  11841. 0    belong        0x3bf20d0a    python 2.3 byte-compiled
  11842. 0    belong        0x6df20d0a    python 2.4 byte-compiled
  11843. 0    belong        0xb3f20d0a    python 2.5 byte-compiled
  11844.  
  11845. 0    string/b  #!\ /usr/bin/python    python script text executable
  11846.  
  11847.  
  11848. #------------------------------------------------------------------------------
  11849. # file(1) magic for revision control files
  11850. # From Hendrik Scholz <hendrik@scholz.net>
  11851. 0    string    /1\ :pserver:    cvs password text file
  11852.  
  11853. # Conary changesets
  11854. # From: Jonathan Smith <smithj@rpath.com>
  11855. 0    belong    0xea3f81bb    Conary changeset data
  11856.  
  11857. # Type: Git bundles (git-bundle)
  11858. # From: Josh Triplett <josh@freedesktop.org>
  11859. 0    string    #\ v2\ git\ bundle\n    Git bundle
  11860.  
  11861. # Type:    Mercurial bundles
  11862. # From:    Seo Sanghyeon <tinuviel@sparcs.kaist.ac.kr>
  11863. 0    string    HG10        Mercurial bundle,
  11864. >4    string    UN        uncompressed
  11865. >4    string    BZ        bzip2 compressed
  11866.  
  11867. # Type:    Subversion (SVN) dumps
  11868. # From:    Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de>
  11869. 0    string    SVN-fs-dump-format-version:    Subversion dumpfile
  11870. >28    string    >\0                (version: %s)
  11871.  
  11872. # Type:    Bazaar revision bundles and merge requests
  11873. # URL:    http://www.bazaar-vcs.org/
  11874. # From:    Jelmer Vernooij <jelmer@samba.org>
  11875. 0    string    #\ Bazaar\ revision\ bundle\ v Bazaar Bundle
  11876. 0    string    #\ Bazaar\ merge\ directive\ format Bazaar merge directive
  11877.  
  11878. #------------------------------------------------------------------------------
  11879. # riff:  file(1) magic for RIFF format
  11880. # See
  11881. #
  11882. #    http://www.seanet.com/users/matts/riffmci/riffmci.htm
  11883. #
  11884. # AVI section extended by Patrik Rσdman <patrik+file-magic@iki.fi>
  11885. #
  11886. 0    string        RIFF        RIFF (little-endian) data
  11887. # RIFF Palette format
  11888. >8    string        PAL        \b, palette
  11889. >>16    leshort        x        \b, version %d
  11890. >>18    leshort        x        \b, %d entries
  11891. # RIFF Device Independent Bitmap format
  11892. >8    string        RDIB        \b, device-independent bitmap
  11893. >>16    string        BM        
  11894. >>>30    leshort        12        \b, OS/2 1.x format
  11895. >>>>34    leshort        x        \b, %d x
  11896. >>>>36    leshort        x        %d
  11897. >>>30    leshort        64        \b, OS/2 2.x format
  11898. >>>>34    leshort        x        \b, %d x
  11899. >>>>36    leshort        x        %d
  11900. >>>30    leshort        40        \b, Windows 3.x format
  11901. >>>>34    lelong        x        \b, %d x
  11902. >>>>38    lelong        x        %d x
  11903. >>>>44    leshort        x        %d
  11904. # RIFF MIDI format
  11905. >8    string        RMID        \b, MIDI
  11906. # RIFF Multimedia Movie File format
  11907. >8    string        RMMP        \b, multimedia movie
  11908. # RIFF wrapper for MP3
  11909. >8    string        RMP3        \b, MPEG Layer 3 audio
  11910. # Microsoft WAVE format (*.wav)
  11911. >8    string        WAVE        \b, WAVE audio
  11912. !:mime    audio/x-wav
  11913. >>20    leshort        1        \b, Microsoft PCM
  11914. >>>34    leshort        >0        \b, %d bit
  11915. >>20    leshort        2        \b, Microsoft ADPCM
  11916. >>20    leshort        6        \b, ITU G.711 A-law
  11917. >>20    leshort        7        \b, ITU G.711 mu-law
  11918. >>20    leshort        17        \b, IMA ADPCM
  11919. >>20    leshort        20        \b, ITU G.723 ADPCM (Yamaha)
  11920. >>20    leshort        49        \b, GSM 6.10
  11921. >>20    leshort        64        \b, ITU G.721 ADPCM
  11922. >>20    leshort        80        \b, MPEG
  11923. >>20    leshort        85        \b, MPEG Layer 3
  11924. >>22    leshort        =1        \b, mono
  11925. >>22    leshort        =2        \b, stereo
  11926. >>22    leshort        >2        \b, %d channels
  11927. >>24    lelong        >0        %d Hz
  11928. # Corel Draw Picture
  11929. >8    string        CDRA        \b, Corel Draw Picture
  11930. !:mime    image/x-coreldraw
  11931. # AVI == Audio Video Interleave
  11932. >8    string        AVI\040        \b, AVI
  11933. !:mime    video/x-msvideo
  11934. >>12    string          LIST
  11935. >>>20   string          hdrlavih
  11936. >>>>&36 lelong          x               \b, %lu x
  11937. >>>>&40 lelong          x               %lu,
  11938. >>>>&4  lelong          >1000000        <1 fps,
  11939. >>>>&4  lelong          1000000         1.00 fps,
  11940. >>>>&4  lelong          500000          2.00 fps,
  11941. >>>>&4  lelong          333333          3.00 fps,
  11942. >>>>&4  lelong          250000          4.00 fps,
  11943. >>>>&4  lelong          200000          5.00 fps,
  11944. >>>>&4  lelong          166667          6.00 fps,
  11945. >>>>&4  lelong          142857          7.00 fps,
  11946. >>>>&4  lelong          125000          8.00 fps,
  11947. >>>>&4  lelong          111111          9.00 fps,
  11948. >>>>&4  lelong          100000          10.00 fps,
  11949. # ]9.9,10.1[
  11950. >>>>&4  lelong          <101010
  11951. >>>>>&-4        lelong  >99010
  11952. >>>>>>&-4       lelong  !100000         ~10 fps,
  11953. >>>>&4  lelong          83333           12.00 fps,
  11954. # ]11.9,12.1[
  11955. >>>>&4  lelong          <84034
  11956. >>>>>&-4        lelong  >82645
  11957. >>>>>>&-4       lelong  !83333          ~12 fps,
  11958. >>>>&4  lelong          66667           15.00 fps,
  11959. # ]14.9,15.1[
  11960. >>>>&4  lelong          <67114
  11961. >>>>>&-4        lelong  >66225
  11962. >>>>>>&-4       lelong  !66667          ~15 fps,
  11963. >>>>&4  lelong          50000           20.00 fps,
  11964. >>>>&4  lelong          41708           23.98 fps,
  11965. >>>>&4  lelong          41667           24.00 fps,
  11966. # ]23.9,24.1[
  11967. >>>>&4  lelong          <41841
  11968. >>>>>&-4        lelong  >41494
  11969. >>>>>>&-4       lelong  !41708
  11970. >>>>>>>&-4      lelong  !41667          ~24 fps,
  11971. >>>>&4  lelong          40000           25.00 fps,
  11972. # ]24.9,25.1[
  11973. >>>>&4  lelong          <40161
  11974. >>>>>&-4        lelong  >39841
  11975. >>>>>>&-4       lelong  !40000          ~25 fps,
  11976. >>>>&4  lelong          33367           29.97 fps,
  11977. >>>>&4  lelong          33333           30.00 fps,
  11978. # ]29.9,30.1[
  11979. >>>>&4  lelong          <33445
  11980. >>>>>&-4        lelong  >33223
  11981. >>>>>>&-4       lelong  !33367
  11982. >>>>>>>&-4      lelong  !33333          ~30 fps,
  11983. >>>>&4  lelong          <32224          >30 fps,
  11984. ##>>>>&4  lelong          x               (%lu)
  11985. ##>>>>&20 lelong          x               %lu frames,
  11986. # Note: The tests below assume that the AVI has 1 or 2 streams,
  11987. #       "vids" optionally followed by "auds".
  11988. #       (Should cover 99.9% of all AVIs.)
  11989. # assuming avih length = 56
  11990. >>>88   string  LIST
  11991. >>>>96  string  strlstrh
  11992. >>>>>108        string  vids    video:
  11993. >>>>>>&0        lelong  0               uncompressed
  11994. # skip past vids strh
  11995. >>>>>>(104.l+108)       string  strf
  11996. >>>>>>>(104.l+132)      lelong          1       RLE 8bpp
  11997. >>>>>>>(104.l+132)      string/c        cvid    Cinepak
  11998. >>>>>>>(104.l+132)      string/c        i263    Intel I.263
  11999. >>>>>>>(104.l+132)      string/c        iv32    Indeo 3.2
  12000. >>>>>>>(104.l+132)      string/c        iv41    Indeo 4.1
  12001. >>>>>>>(104.l+132)      string/c        iv50    Indeo 5.0
  12002. >>>>>>>(104.l+132)      string/c        mp42    Microsoft MPEG-4 v2
  12003. >>>>>>>(104.l+132)      string/c        mp43    Microsoft MPEG-4 v3
  12004. >>>>>>>(104.l+132)      string/c        fmp4    FFMpeg MPEG-4
  12005. >>>>>>>(104.l+132)      string/c        mjpg    Motion JPEG
  12006. >>>>>>>(104.l+132)      string/c        div3    DivX 3
  12007. >>>>>>>>112             string/c        div3    Low-Motion
  12008. >>>>>>>>112             string/c        div4    Fast-Motion
  12009. >>>>>>>(104.l+132)      string/c        divx    DivX 4
  12010. >>>>>>>(104.l+132)      string/c        dx50    DivX 5
  12011. >>>>>>>(104.l+132)      string/c        xvid    XviD
  12012. >>>>>>>(104.l+132)    string/c    h264    H.264
  12013. >>>>>>>(104.l+132)      string/c        wmv3    Windows Media Video 9
  12014. >>>>>>>(104.l+132)      string/c        h264    X.264
  12015. >>>>>>>(104.l+132)      lelong  0
  12016. ##>>>>>>>(104.l+132)      string  x       (%.4s)
  12017. # skip past first (video) LIST
  12018. >>>>(92.l+96)   string  LIST
  12019. >>>>>(92.l+104) string  strlstrh
  12020. >>>>>>(92.l+116)        string          auds    \b, audio:
  12021. # auds strh length = 56:
  12022. >>>>>>>(92.l+172)       string          strf
  12023. >>>>>>>>(92.l+180)      leshort 0x0001  uncompressed PCM
  12024. >>>>>>>>(92.l+180)      leshort 0x0002  ADPCM
  12025. >>>>>>>>(92.l+180)      leshort 0x0006  aLaw
  12026. >>>>>>>>(92.l+180)      leshort 0x0007  uLaw
  12027. >>>>>>>>(92.l+180)      leshort 0x0050  MPEG-1 Layer 1 or 2
  12028. >>>>>>>>(92.l+180)      leshort 0x0055  MPEG-1 Layer 3
  12029. >>>>>>>>(92.l+180)      leshort 0x2000  Dolby AC3
  12030. >>>>>>>>(92.l+180)      leshort 0x0161  DivX
  12031. ##>>>>>>>>(92.l+180)      leshort x       (0x%.4x)
  12032. >>>>>>>>(92.l+182)      leshort 1       (mono,
  12033. >>>>>>>>(92.l+182)      leshort 2       (stereo,
  12034. >>>>>>>>(92.l+182)      leshort >2      (%d channels,
  12035. >>>>>>>>(92.l+184)      lelong  x       %d Hz)
  12036. # auds strh length = 64:
  12037. >>>>>>>(92.l+180)       string          strf
  12038. >>>>>>>>(92.l+188)      leshort 0x0001  uncompressed PCM
  12039. >>>>>>>>(92.l+188)      leshort 0x0002  ADPCM
  12040. >>>>>>>>(92.l+188)      leshort 0x0055  MPEG-1 Layer 3
  12041. >>>>>>>>(92.l+188)      leshort 0x2000  Dolby AC3
  12042. >>>>>>>>(92.l+188)      leshort 0x0161  DivX
  12043. ##>>>>>>>>(92.l+188)      leshort x       (0x%.4x)
  12044. >>>>>>>>(92.l+190)      leshort 1       (mono,
  12045. >>>>>>>>(92.l+190)      leshort 2       (stereo,
  12046. >>>>>>>>(92.l+190)      leshort >2      (%d channels,
  12047. >>>>>>>>(92.l+192)      lelong  x       %d Hz)
  12048. # Animated Cursor format
  12049. >8    string        ACON        \b, animated cursor
  12050. # SoundFont 2 <mpruett@sgi.com>
  12051. >8    string        sfbk        SoundFont/Bank
  12052. # MPEG-1 wrapped in a RIFF, apparently
  12053. >8      string          CDXA            \b, wrapped MPEG-1 (CDXA)
  12054. >8    string        4XMV        \b, 4X Movie file 
  12055.  
  12056. #
  12057. # XXX - some of the below may only appear in little-endian form.
  12058. #
  12059. # Also "MV93" appears to be for one form of Macromedia Director
  12060. # files, and "GDMF" appears to be another multimedia format.
  12061. #
  12062. 0    string        RIFX        RIFF (big-endian) data
  12063. # RIFF Palette format
  12064. >8    string        PAL        \b, palette
  12065. >>16    beshort        x        \b, version %d
  12066. >>18    beshort        x        \b, %d entries
  12067. # RIFF Device Independent Bitmap format
  12068. >8    string        RDIB        \b, device-independent bitmap
  12069. >>16    string        BM        
  12070. >>>30    beshort        12        \b, OS/2 1.x format
  12071. >>>>34    beshort        x        \b, %d x
  12072. >>>>36    beshort        x        %d
  12073. >>>30    beshort        64        \b, OS/2 2.x format
  12074. >>>>34    beshort        x        \b, %d x
  12075. >>>>36    beshort        x        %d
  12076. >>>30    beshort        40        \b, Windows 3.x format
  12077. >>>>34    belong        x        \b, %d x
  12078. >>>>38    belong        x        %d x
  12079. >>>>44    beshort        x        %d
  12080. # RIFF MIDI format
  12081. >8    string        RMID        \b, MIDI
  12082. # RIFF Multimedia Movie File format
  12083. >8    string        RMMP        \b, multimedia movie
  12084. # Microsoft WAVE format (*.wav)
  12085. >8    string        WAVE        \b, WAVE audio
  12086. >>20    leshort        1        \b, Microsoft PCM
  12087. >>>34    leshort        >0        \b, %d bit
  12088. >>22    beshort        =1        \b, mono
  12089. >>22    beshort        =2        \b, stereo
  12090. >>22    beshort        >2        \b, %d channels
  12091. >>24    belong        >0        %d Hz
  12092. # Corel Draw Picture
  12093. >8    string        CDRA        \b, Corel Draw Picture
  12094. # AVI == Audio Video Interleave
  12095. >8    string        AVI\040        \b, AVI
  12096. # Animated Cursor format
  12097. >8    string        ACON        \b, animated cursor
  12098. # Notation Interchange File Format (big-endian only)
  12099. >8    string        NIFF        \b, Notation Interchange File Format
  12100. # SoundFont 2 <mpruett@sgi.com>
  12101. >8    string        sfbk        SoundFont/Bank
  12102. #------------------------------------------------------------------------------
  12103. #
  12104. # RPM: file(1) magic for Red Hat Packages   Erik Troan (ewt@redhat.com)
  12105. #
  12106. 0    beshort        0xedab
  12107. >2    beshort        0xeedb        RPM
  12108. !:mime    application/x-rpm
  12109. >>4    byte        x        v%d
  12110. >>6    beshort        0        bin
  12111. >>6    beshort        1        src
  12112. >>8    beshort        1        i386
  12113. >>8    beshort        2        Alpha
  12114. >>8    beshort        3        Sparc
  12115. >>8    beshort        4        MIPS
  12116. >>8    beshort        5        PowerPC
  12117. >>8    beshort        6        68000
  12118. >>8    beshort        7        SGI
  12119. >>8    beshort        8        RS6000
  12120. >>8    beshort        9        IA64
  12121. >>8    beshort        10        Sparc64
  12122. >>8    beshort        11        MIPSel
  12123. >>8    beshort        12        ARM
  12124. >>10    string        x        %s
  12125.  
  12126. #------------------------------------------------------------------------------
  12127. # rtf:    file(1) magic for Rich Text Format (RTF)
  12128. #
  12129. # Duncan P. Simpson, D.P.Simpson@dcs.warwick.ac.uk
  12130. #
  12131. 0    string        {\\rtf        Rich Text Format data,
  12132. !:mime    text/rtf
  12133. >5    string        1        version 1,
  12134. >>6    string        \\ansi        ANSI
  12135. >>6    string        \\mac        Apple Macintosh
  12136. >>6    string        \\pc        IBM PC, code page 437
  12137. >>6    string        \\pca        IBM PS/2, code page 850
  12138. >>6    default        x        unknown character set
  12139. >5    default        x        unknown version
  12140.  
  12141. #------------------------------------------------------------------------------
  12142. # sc:  file(1) magic for "sc" spreadsheet
  12143. #
  12144. 38    string        Spreadsheet    sc spreadsheet file
  12145. !:mime    application/x-sc
  12146.  
  12147. #------------------------------------------------------------------------------
  12148. # sccs:  file(1) magic for SCCS archives
  12149. #
  12150. # SCCS archive structure:
  12151. # \001h01207
  12152. # \001s 00276/00000/00000
  12153. # \001d D 1.1 87/09/23 08:09:20 ian 1 0
  12154. # \001c date and time created 87/09/23 08:09:20 by ian
  12155. # \001e
  12156. # \001u
  12157. # \001U
  12158. # ... etc.
  12159. # Now '\001h' happens to be the same as the 3B20's a.out magic number (0550).
  12160. # *Sigh*. And these both came from various parts of the USG.
  12161. # Maybe we should just switch everybody from SCCS to RCS!
  12162. # Further, you can't just say '\001h0', because the five-digit number
  12163. # is a checksum that could (presumably) have any leading digit,
  12164. # and we don't have regular expression matching yet. 
  12165. # Hence the following official kludge:
  12166. 8    string        \001s\             SCCS archive data
  12167. #------------------------------------------------------------------------------
  12168. # scientific:  file(1) magic for scientific formats 
  12169. #
  12170. # From: Joe Krahn <krahn@niehs.nih.gov>
  12171.  
  12172. ########################################################
  12173. # CCP4 data and plot files:
  12174. 0    string        MTZ\040        MTZ reflection file
  12175.  
  12176. 92    string        PLOT%%84    Plot84 plotting file
  12177. >52    byte        1        , Little-endian
  12178. >55    byte        1        , Big-endian
  12179.  
  12180. ########################################################
  12181. # Electron density MAP/MASK formats
  12182.  
  12183. 0    string        EZD_MAP    NEWEZD Electron Density Map
  12184. 109    string        MAP\040(  Old EZD Electron Density Map
  12185.  
  12186. 0    string/c    :-)\040Origin    BRIX Electron Density Map
  12187. >170    string        >0    , Sigma:%.12s
  12188. #>4    string        >0    %.178s
  12189. #>4    addr        x    %.178s
  12190.  
  12191. 7    string        18\040!NTITLE    XPLOR ASCII Electron Density Map
  12192. 9    string        \040!NTITLE\012\040REMARK    CNS ASCII electron density map
  12193.  
  12194. 208    string        MAP\040    CCP4 Electron Density Map
  12195. # Assumes same stamp for float and double (normal case)
  12196. >212    byte        17    \b, Big-endian
  12197. >212    byte        34    \b, VAX format
  12198. >212    byte        68    \b, Little-endian
  12199. >212    byte        85    \b, Convex native
  12200.  
  12201. ############################################################
  12202. # X-Ray Area Detector images
  12203. 0    string    R-AXIS4\ \ \     R-Axis Area Detector Image:
  12204. >796    lelong    <20        Little-endian, IP #%d,
  12205. >>768    lelong    >0        Size=%dx
  12206. >>772    lelong    >0        \b%d
  12207. >796    belong    <20        Big-endian, IP #%d,
  12208. >>768    belong    >0        Size=%dx
  12209. >>772    belong    >0        \b%d
  12210.  
  12211. 0    string    RAXIS\ \ \ \ \     R-Axis Area Detector Image, Win32:
  12212. >796    lelong    <20        Little-endian, IP #%d,
  12213. >>768    lelong    >0        Size=%dx
  12214. >>772    lelong    >0        \b%d
  12215. >796    belong    <20        Big-endian, IP #%d,
  12216. >>768    belong    >0        Size=%dx
  12217. >>772    belong    >0        \b%d
  12218.  
  12219.  
  12220. 1028    string    MMX\000\000\000\000\000\000\000\000\000\000\000\000\000    MAR Area Detector Image,
  12221. >1072    ulong    >1        Compressed(%d),
  12222. >1100    ulong    >1        %d headers,
  12223. >1104    ulong    >0        %d x
  12224. >1108    ulong    >0        %d,
  12225. >1120    ulong    >0        %d bits/pixel
  12226.  
  12227. # Type: GEDCOM genealogical (family history) data
  12228. # From: Giuseppe Bilotta
  12229. 0       search/1/c    0\ HEAD         GEDCOM genealogy text
  12230. >&0     search        1\ GEDC
  12231. >>&0    search        2\ VERS         version
  12232. >>>&1   search/1    >\0        %s
  12233. # From: Phil Endecott <phil05@chezphil.org>
  12234. 0    string    \000\060\000\040\000\110\000\105\000\101\000\104        GEDCOM data
  12235. 0    string    \060\000\040\000\110\000\105\000\101\000\104\000        GEDCOM data
  12236. 0    string    \376\377\000\060\000\040\000\110\000\105\000\101\000\104    GEDCOM data
  12237. 0    string    \377\376\060\000\040\000\110\000\105\000\101\000\104\000    GEDCOM data
  12238. 0    search/1        -----BEGIN\ CERTIFICATE------    RFC1421 Security Certificate text
  12239. 0    search/1        -----BEGIN\ NEW\ CERTIFICATE    RFC1421 Security Certificate Signing Request text
  12240. 0    belong    0xedfeedfe    Sun 'jks' Java Keystore File data
  12241. # Type:    SE Linux policy modules *.pp reference policy
  12242. #    for Fedora 5 to 9, RHEL5, and Debian Etch and Lenny.
  12243. # URL:    http://doc.coker.com.au/computers/selinux-magic
  12244. # From:    Russell Coker <russell@coker.com.au>
  12245.  
  12246. 0        lelong    0xf97cff8f    SE Linux modular policy
  12247. >4        lelong    x        version %d,
  12248. >8        lelong    x        %d sections,
  12249. >>(12.l)    lelong    0xf97cff8d
  12250. >>>(12.l+27)    lelong    x        mod version %d,
  12251. >>>(12.l+31)    lelong    0        Not MLS,
  12252. >>>(12.l+31)    lelong    1        MLS,
  12253. >>>(12.l+23)    lelong    2
  12254. >>>>(12.l+47)    string    >\0        module name %s
  12255. >>>(12.l+23)    lelong    1        base
  12256.  
  12257. 1    string    policy_module(    SE Linux policy module source
  12258. 2    string    policy_module(    SE Linux policy module source
  12259.  
  12260. 0    string    ##\ <summary>    SE Linux policy interface source
  12261.  
  12262. #0    search    gen_context(    SE Linux policy file contexts
  12263.  
  12264. #0    search    gen_sens(    SE Linux policy MLS constraints source
  12265.  
  12266. #------------------------------------------------------------------------------
  12267. # sendmail:  file(1) magic for sendmail config files
  12268. #
  12269. # XXX - byte order?
  12270. #
  12271. 0    byte    046      Sendmail frozen configuration 
  12272. >16    string    >\0      - version %s
  12273. 0    short    0x271c      Sendmail frozen configuration
  12274. >16    string    >\0      - version %s
  12275.  
  12276. #------------------------------------------------------------------------------
  12277. # sendmail:  file(1) magic for sendmail m4(1) files
  12278. #
  12279. # From Hendrik Scholz <hendrik@scholz.net>
  12280. # i.e. files in /usr/share/sendmail/cf/
  12281. #
  12282. 0   string  divert(-1)\n    sendmail m4 text file
  12283.  
  12284.  
  12285. #------------------------------------------------------------------------------
  12286. # sequent:  file(1) magic for Sequent machines
  12287. #
  12288. # Sequent information updated by Don Dwiggins <atsun!dwiggins>.
  12289. # For Sequent's multiprocessor systems (incomplete).
  12290. 0    lelong    0x00ea            BALANCE NS32000 .o
  12291. >16    lelong    >0        not stripped
  12292. >124    lelong    >0        version %ld
  12293. 0    lelong    0x10ea            BALANCE NS32000 executable (0 @ 0)
  12294. >16    lelong  >0                not stripped
  12295. >124    lelong    >0        version %ld
  12296. 0    lelong    0x20ea            BALANCE NS32000 executable (invalid @ 0)
  12297. >16    lelong  >0                not stripped
  12298. >124    lelong    >0        version %ld
  12299. 0    lelong    0x30ea            BALANCE NS32000 standalone executable
  12300. >16    lelong  >0              not stripped
  12301. >124    lelong    >0        version %ld
  12302. #
  12303. # Symmetry information added by Jason Merrill <jason@jarthur.claremont.edu>.
  12304. # Symmetry magic nums will not be reached if DOS COM comes before them;
  12305. # byte 0xeb is matched before these get a chance.
  12306. 0    leshort    0x12eb        SYMMETRY i386 .o
  12307. >16    lelong    >0        not stripped
  12308. >124    lelong    >0        version %ld
  12309. 0    leshort    0x22eb        SYMMETRY i386 executable (0 @ 0)
  12310. >16    lelong    >0        not stripped
  12311. >124    lelong    >0        version %ld
  12312. 0    leshort    0x32eb        SYMMETRY i386 executable (invalid @ 0)
  12313. >16    lelong    >0        not stripped
  12314. >124    lelong    >0        version %ld
  12315. 0    leshort    0x42eb        SYMMETRY i386 standalone executable
  12316. >16    lelong    >0        not stripped
  12317. >124    lelong    >0        version %ld
  12318.  
  12319. #------------------------------------------------------------------------------
  12320. # sgi:  file(1) magic for Silicon Graphics applications
  12321.  
  12322. #
  12323. #
  12324. # Performance Co-Pilot file types
  12325. 0    string    PmNs                PCP compiled namespace (V.0)
  12326. 0    string    PmN                PCP compiled namespace
  12327. >3    string    >\0                (V.%1.1s)
  12328. #3    lelong    0x84500526            PCP archive
  12329. 3    belong    0x84500526            PCP archive
  12330. >7    byte    x                (V.%d)
  12331. #>20    lelong    -2                temporal index
  12332. #>20    lelong    -1                metadata
  12333. #>20    lelong    0                log volume #0
  12334. #>20    lelong    >0                log volume #%ld
  12335. >20    belong    -2                temporal index
  12336. >20    belong    -1                metadata
  12337. >20    belong    0                log volume #0
  12338. >20    belong    >0                log volume #%ld
  12339. >24    string    >\0                host: %s
  12340. 0    string    PCPFolio            PCP
  12341. >9    string    Version:            Archive Folio
  12342. >18    string    >\0                (V.%s)
  12343. 0    string    #pmchart            PCP pmchart view
  12344. >9    string    Version
  12345. >17    string    >\0                (V%-3.3s)
  12346. 0    string    #kmchart            PCP kmchart view
  12347. >9    string    Version
  12348. >17    string    >\0                (V.%s)
  12349. 0    string    pmview                PCP pmview config
  12350. >7    string    Version
  12351. >15    string    >\0                (V%-3.3s)
  12352. 0    string    #pmlogger            PCP pmlogger config
  12353. >10    string    Version
  12354. >18    string    >\0                (V%1.1s)
  12355. 0    string    #pmdahotproc            PCP pmdahotproc config
  12356. >13    string    Version
  12357. >21    string    >\0                (V%-3.3s)
  12358. 0    string    PcPh                PCP Help
  12359. >4    string    1                Index
  12360. >4    string    2                Text
  12361. >5    string    >\0                (V.%1.1s)
  12362. 0    string    #pmieconf-rules            PCP pmieconf rules
  12363. >16    string    >\0                (V.%1.1s)
  12364. 3    string    pmieconf-pmie            PCP pmie config
  12365. >17    string    >\0                (V.%1.1s)
  12366.  
  12367. # SpeedShop data files
  12368. 0    lelong    0x13130303            SpeedShop data file
  12369.  
  12370. # mdbm files
  12371. 0    lelong    0x01023962            mdbm file, version 0 (obsolete)
  12372. 0    string    mdbm                mdbm file,
  12373. >5    byte    x                version %d,
  12374. >6    byte    x                2^%d pages,
  12375. >7    byte    x                pagesize 2^%d,
  12376. >17    byte    x                hash %d,
  12377. >11    byte    x                dataformat %d
  12378.  
  12379. # Alias Maya files
  12380. 0    string    //Maya ASCII    Alias Maya Ascii File,
  12381. >13    string    >\0    version %s
  12382. 8    string    MAYAFOR4    Alias Maya Binary File,
  12383. >32    string    >\0    version %s scene
  12384. 8    string    MayaFOR4    Alias Maya Binary File,
  12385. >32    string    >\0    version %s scene
  12386. 8    string    CIMG        Alias Maya Image File
  12387. 8    string    DEEP        Alias Maya Image File
  12388. #------------------------------------------------------------------------------
  12389. # Type:    SVG Vectorial Graphics
  12390. # From:    Noel Torres <tecnico@ejerciciosresueltos.com>
  12391. 0    string        \<?xml\ version="
  12392. >15    string        >\0
  12393. >>23    search/400    \<svg            SVG Scalable Vector Graphics image
  12394. !:mime    image/svg+xml
  12395. >>23    search/400    \<gnc-v2        GnuCash file
  12396. !:mime    application/x-gnucash
  12397.  
  12398. #------------------------------------------------------------------------------
  12399. # sgml:  file(1) magic for Standard Generalized Markup Language
  12400. # HyperText Markup Language (HTML) is an SGML document type,
  12401. # from Daniel Quinlan (quinlan@yggdrasil.com)
  12402. # adapted to string extenstions by Anthon van der Neut <anthon@mnt.org)
  12403. 0    search/1/cB    \<!doctype\ html    HTML document text
  12404. !:mime    text/html
  12405. 0    search/1/cb    \<head            HTML document text
  12406. !:mime    text/html
  12407. 0    search/1/cb    \<title            HTML document text
  12408. !:mime    text/html
  12409. 0    search/1/cb    \<html            HTML document text
  12410. !:mime    text/html
  12411.  
  12412. # Extensible markup language (XML), a subset of SGML
  12413. # from Marc Prud'hommeaux (marc@apocalypse.org)
  12414. 0    search/1/cb    \<?xml            XML document text
  12415. 0    string        \<?xml\ version\ "    XML
  12416. 0    string        \<?xml\ version="    XML
  12417. 0    string        \<?xml\ version='    XML
  12418. >15    search/1    >\0            %.3s document text
  12419. >>23    search/1    \<xsl:stylesheet    (XSL stylesheet)
  12420. >>24    search/1    \<xsl:stylesheet    (XSL stylesheet)
  12421. 0    search/1/b    \<?xml            XML document text
  12422. 0    search/1/b    \<?XML            broken XML document text
  12423.  
  12424.  
  12425. # SGML, mostly from rph@sq
  12426. 0    search/1/cb    \<!doctype        exported SGML document text
  12427. 0    search/1/cb    \<!subdoc        exported SGML subdocument text
  12428. 0    search/1/cb    \<!--            exported SGML document text
  12429.  
  12430. # Web browser cookie files
  12431. # (Mozilla, Galeon, Netscape 4, Konqueror..)
  12432. # Ulf Harnhammar <ulfh@update.uu.se>
  12433. 0    search/1    #\ HTTP\ Cookie\ File    Web browser cookie text
  12434. 0    search/1    #\ Netscape\ HTTP\ Cookie\ File    Netscape cookie text
  12435. 0    search/1    #\ KDE\ Cookie\ File    Konqueror cookie text
  12436.  
  12437. #------------------------------------------------------------------------
  12438. # file(1) magic for sharc files
  12439. #
  12440. # SHARC DSP, MIDI SysEx and RiscOS filetype definitions added by 
  12441. # FutureGroove Music (dsp@futuregroove.de)
  12442.  
  12443. #------------------------------------------------------------------------
  12444. #0    string            Draw        RiscOS Drawfile
  12445. #0    string            PACK        RiscOS PackdDir archive
  12446.  
  12447. #------------------------------------------------------------------------
  12448. # SHARC DSP stuff (based on the FGM SHARC DSP SDK)
  12449.  
  12450. #0    string            =!        Assembler source
  12451. #0    string            Analog        ADi asm listing file
  12452. 0    string            .SYSTEM        SHARC architecture file
  12453. 0    string            .system        SHARC architecture file
  12454.  
  12455. 0    leshort            0x521C        SHARC COFF binary
  12456. >2    leshort            >1        , %hd sections
  12457. >>12    lelong            >0        , not stripped
  12458.  
  12459. #------------------------------------------------------------------------------
  12460. # sinclair:  file(1) sinclair QL
  12461.  
  12462. # additions to /etc/magic by Thomas M. Ott (ThMO)
  12463.  
  12464. # Sinclair QL floppy disk formats (ThMO)
  12465. 0    string    =QL5        QL disk dump data,
  12466. >3    string    =A        720 KB,
  12467. >3    string    =B        1.44 MB,
  12468. >3    string    =C        3.2 MB,
  12469. >4    string    >\0        label:%.10s
  12470.  
  12471. # Sinclair QL OS dump (ThMO)
  12472. # (NOTE: if `file' would be able to use indirect references in a endian format
  12473. #     differing from the natural host format, this could be written more
  12474. #     reliably and faster...)
  12475. #
  12476. # we *can't* lookup QL OS code dumps, because `file' is UNABLE to read more
  12477. # than the first 8K of a file... #-(
  12478. #
  12479. #0        belong    =0x30000
  12480. #>49124        belong    <47104
  12481. #>>49128        belong    <47104
  12482. #>>>49132    belong    <47104
  12483. #>>>>49136    belong    <47104    QL OS dump data,
  12484. #>>>>>49148    string    >\0    type %.3s,
  12485. #>>>>>49142    string    >\0    version %.4s
  12486.  
  12487. # Sinclair QL firmware executables (ThMO)
  12488. 0    string    NqNqNq`\004    QL firmware executable (BCPL)
  12489.  
  12490. # Sinclair QL libraries (was ThMO)
  12491. 0    beshort    0xFB01        QDOS object
  12492. >2    pstring    x        '%s'
  12493.  
  12494. # Sinclair QL executables (was ThMO)
  12495. 4    belong    0x4AFB        QDOS executable
  12496. >9    pstring    x        '%s'
  12497.  
  12498. # Sinclair QL ROM (ThMO)
  12499. 0    belong    =0x4AFB0001    QL plugin-ROM data,
  12500. >9    pstring    =\0        un-named
  12501. >9    pstring    >\0        named: %s
  12502. # Type: SiSU Markup Language
  12503. # URL:  http://www.sisudoc.org/
  12504. # From: Ralph Amissah <ralph.amissah@gmail.com>
  12505.  
  12506. 0    regex    \^%?[\ \t]*SiSU[\ \t]+insert    SiSU text insert
  12507. >5    regex    [0-9.]+                %s
  12508.  
  12509. 0    regex    \^%[\ \t]+SiSU[\ \t]+master    SiSU text master
  12510. >5    regex    [0-9.]+                %s
  12511.  
  12512. 0    regex    \^%?[\ \t]*SiSU[\ \t]+text    SiSU text
  12513. >5    regex    [0-9.]+                %s
  12514.  
  12515. 0    regex    \^%?[\ \t]*SiSU[\ \t][0-9.]+    SiSU text
  12516. >5    regex    [0-9.]+                %s
  12517.  
  12518. 0    regex    \^%*[\ \t]*sisu-[0-9.]+        SiSU text
  12519. >5    regex    [0-9.]+                %s
  12520. #------------------------------------------------------------------------------
  12521. # Sketch Drawings: http://sketch.sourceforge.net/ 
  12522. # From: Edwin Mons <e@ik.nu>
  12523. 0    search/1    ##Sketch    Sketch document text
  12524.  
  12525. #-----------------------------------------------
  12526. # GNU Smalltalk image, starting at version 1.6.2
  12527. # From: catull_us@yahoo.com
  12528. #
  12529. 0    string    GSTIm\0\0    GNU SmallTalk
  12530. # little-endian
  12531. >7    byte&1    =0        LE image version
  12532. >>10    byte    x        %d.
  12533. >>9    byte    x        \b%d.
  12534. >>8    byte    x        \b%d
  12535. #>>12    lelong    x        , data: %ld
  12536. #>>16    lelong    x        , table: %ld
  12537. #>>20    lelong    x        , memory: %ld
  12538. # big-endian
  12539. >7    byte&1    =1        BE image version
  12540. >>8    byte    x        %d.
  12541. >>9    byte    x        \b%d.
  12542. >>10    byte    x        \b%d
  12543. #>>12    belong    x        , data: %ld
  12544. #>>16    belong    x        , table: %ld
  12545. #>>20    belong    x        , memory: %ld
  12546.  
  12547.  
  12548.  
  12549. #------------------------------------------------------------------------------
  12550. # sniffer:  file(1) magic for packet capture files
  12551. #
  12552. # From: guy@alum.mit.edu (Guy Harris)
  12553. #
  12554.  
  12555. #
  12556. # Microsoft Network Monitor 1.x capture files.
  12557. #
  12558. 0    string        RTSS        NetMon capture file
  12559. >5    byte        x        - version %d
  12560. >4    byte        x        \b.%d
  12561. >6    leshort        0        (Unknown)
  12562. >6    leshort        1        (Ethernet)
  12563. >6    leshort        2        (Token Ring)
  12564. >6    leshort        3        (FDDI)
  12565. >6    leshort        4        (ATM)
  12566.  
  12567. #
  12568. # Microsoft Network Monitor 2.x capture files.
  12569. #
  12570. 0    string        GMBU        NetMon capture file
  12571. >5    byte        x        - version %d
  12572. >4    byte        x        \b.%d
  12573. >6    leshort        0        (Unknown)
  12574. >6    leshort        1        (Ethernet)
  12575. >6    leshort        2        (Token Ring)
  12576. >6    leshort        3        (FDDI)
  12577. >6    leshort        4        (ATM)
  12578.  
  12579. #
  12580. # Network General Sniffer capture files.
  12581. # Sorry, make that "Network Associates Sniffer capture files."
  12582. # Sorry, make that "Network General old DOS Sniffer capture files."
  12583. #
  12584. 0    string        TRSNIFF\ data\ \ \ \ \032    Sniffer capture file
  12585. >33    byte        2        (compressed)
  12586. >23    leshort        x        - version %d
  12587. >25    leshort        x        \b.%d
  12588. >32    byte        0        (Token Ring)
  12589. >32    byte        1        (Ethernet)
  12590. >32    byte        2        (ARCNET)
  12591. >32    byte        3        (StarLAN)
  12592. >32    byte        4        (PC Network broadband)
  12593. >32    byte        5        (LocalTalk)
  12594. >32    byte        6        (Znet)
  12595. >32    byte        7        (Internetwork Analyzer)
  12596. >32    byte        9        (FDDI)
  12597. >32    byte        10        (ATM)
  12598.  
  12599. #
  12600. # Cinco Networks NetXRay capture files.
  12601. # Sorry, make that "Network General Sniffer Basic capture files."
  12602. # Sorry, make that "Network Associates Sniffer Basic capture files."
  12603. # Sorry, make that "Network Associates Sniffer Basic, and Windows
  12604. # Sniffer Pro", capture files."
  12605. # Sorry, make that "Network General Sniffer capture files."
  12606. #
  12607. 0    string        XCP\0        NetXRay capture file
  12608. >4    string        >\0        - version %s
  12609. >44    leshort        0        (Ethernet)
  12610. >44    leshort        1        (Token Ring)
  12611. >44    leshort        2        (FDDI)
  12612. >44    leshort        3        (WAN)
  12613. >44    leshort        8        (ATM)
  12614. >44    leshort        9        (802.11)
  12615.  
  12616. #
  12617. # "libpcap" capture files.
  12618. # (We call them "tcpdump capture file(s)" for now, as "tcpdump" is
  12619. # the main program that uses that format, but there are other programs
  12620. # that use "libpcap", or that use the same capture file format.)
  12621. #
  12622. 0    ubelong        0xa1b2c3d4    tcpdump capture file (big-endian)
  12623. >4    beshort        x        - version %d
  12624. >6    beshort        x        \b.%d
  12625. >20    belong        0        (No link-layer encapsulation
  12626. >20    belong        1        (Ethernet
  12627. >20    belong        2        (3Mb Ethernet
  12628. >20    belong        3        (AX.25
  12629. >20    belong        4        (ProNET
  12630. >20    belong        5        (CHAOS
  12631. >20    belong        6        (Token Ring
  12632. >20    belong        7        (BSD ARCNET
  12633. >20    belong        8        (SLIP
  12634. >20    belong        9        (PPP
  12635. >20    belong        10        (FDDI
  12636. >20    belong        11        (RFC 1483 ATM
  12637. >20    belong        12        (raw IP
  12638. >20    belong        13        (BSD/OS SLIP
  12639. >20    belong        14        (BSD/OS PPP
  12640. >20    belong        19        (Linux ATM Classical IP
  12641. >20    belong        50        (PPP or Cisco HDLC
  12642. >20    belong        51        (PPP-over-Ethernet
  12643. >20    belong        99        (Symantec Enterprise Firewall
  12644. >20    belong        100        (RFC 1483 ATM
  12645. >20    belong        101        (raw IP
  12646. >20    belong        102        (BSD/OS SLIP
  12647. >20    belong        103        (BSD/OS PPP
  12648. >20    belong        104        (BSD/OS Cisco HDLC
  12649. >20    belong        105        (802.11
  12650. >20    belong        106        (Linux Classical IP over ATM
  12651. >20    belong        107        (Frame Relay
  12652. >20    belong        108        (OpenBSD loopback
  12653. >20    belong        109        (OpenBSD IPsec encrypted
  12654. >20    belong        112        (Cisco HDLC
  12655. >20    belong        113        (Linux "cooked"
  12656. >20    belong        114        (LocalTalk
  12657. >20    belong        117        (OpenBSD PFLOG
  12658. >20    belong        119        (802.11 with Prism header
  12659. >20    belong        122        (RFC 2625 IP over Fibre Channel
  12660. >20    belong        123        (SunATM
  12661. >20    belong        127        (802.11 with radiotap header
  12662. >20    belong        129        (Linux ARCNET
  12663. >20    belong        138        (Apple IP over IEEE 1394
  12664. >20    belong        140        (MTP2
  12665. >20    belong        141        (MTP3
  12666. >20    belong        143        (DOCSIS
  12667. >20    belong        144        (IrDA
  12668. >20    belong        147        (Private use 0
  12669. >20    belong        148        (Private use 1
  12670. >20    belong        149        (Private use 2
  12671. >20    belong        150        (Private use 3
  12672. >20    belong        151        (Private use 4
  12673. >20    belong        152        (Private use 5
  12674. >20    belong        153        (Private use 6
  12675. >20    belong        154        (Private use 7
  12676. >20    belong        155        (Private use 8
  12677. >20    belong        156        (Private use 9
  12678. >20    belong        157        (Private use 10
  12679. >20    belong        158        (Private use 11
  12680. >20    belong        159        (Private use 12
  12681. >20    belong        160        (Private use 13
  12682. >20    belong        161        (Private use 14
  12683. >20    belong        162        (Private use 15
  12684. >20    belong        163        (802.11 with AVS header
  12685. >16    belong        x        \b, capture length %d)
  12686. 0    ulelong        0xa1b2c3d4    tcpdump capture file (little-endian)
  12687. >4    leshort        x        - version %d
  12688. >6    leshort        x        \b.%d
  12689. >20    lelong        0        (No link-layer encapsulation
  12690. >20    lelong        1        (Ethernet
  12691. >20    lelong        2        (3Mb Ethernet
  12692. >20    lelong        3        (AX.25
  12693. >20    lelong        4        (ProNET
  12694. >20    lelong        5        (CHAOS
  12695. >20    lelong        6        (Token Ring
  12696. >20    lelong        7        (ARCNET
  12697. >20    lelong        8        (SLIP
  12698. >20    lelong        9        (PPP
  12699. >20    lelong        10        (FDDI
  12700. >20    lelong        11        (RFC 1483 ATM
  12701. >20    lelong        12        (raw IP
  12702. >20    lelong        13        (BSD/OS SLIP
  12703. >20    lelong        14        (BSD/OS PPP
  12704. >20    lelong        19        (Linux ATM Classical IP
  12705. >20    lelong        50        (PPP or Cisco HDLC
  12706. >20    lelong        51        (PPP-over-Ethernet
  12707. >20    lelong        99        (Symantec Enterprise Firewall
  12708. >20    lelong        100        (RFC 1483 ATM
  12709. >20    lelong        101        (raw IP
  12710. >20    lelong        102        (BSD/OS SLIP
  12711. >20    lelong        103        (BSD/OS PPP
  12712. >20    lelong        104        (BSD/OS Cisco HDLC
  12713. >20    lelong        105        (802.11
  12714. >20    lelong        106        (Linux Classical IP over ATM
  12715. >20    lelong        107        (Frame Relay
  12716. >20    lelong        108        (OpenBSD loopback
  12717. >20    lelong        109        (OpenBSD IPsec encrypted
  12718. >20    lelong        112        (Cisco HDLC
  12719. >20    lelong        113        (Linux "cooked"
  12720. >20    lelong        114        (LocalTalk
  12721. >20    lelong        117        (OpenBSD PFLOG
  12722. >20    lelong        119        (802.11 with Prism header
  12723. >20    lelong        122        (RFC 2625 IP over Fibre Channel
  12724. >20    lelong        123        (SunATM
  12725. >20    lelong        127        (802.11 with radiotap header
  12726. >20    lelong        129        (Linux ARCNET
  12727. >20    lelong        138        (Apple IP over IEEE 1394
  12728. >20    lelong        140        (MTP2
  12729. >20    lelong        141        (MTP3
  12730. >20    lelong        143        (DOCSIS
  12731. >20    lelong        144        (IrDA
  12732. >20    lelong        147        (Private use 0
  12733. >20    lelong        148        (Private use 1
  12734. >20    lelong        149        (Private use 2
  12735. >20    lelong        150        (Private use 3
  12736. >20    lelong        151        (Private use 4
  12737. >20    lelong        152        (Private use 5
  12738. >20    lelong        153        (Private use 6
  12739. >20    lelong        154        (Private use 7
  12740. >20    lelong        155        (Private use 8
  12741. >20    lelong        156        (Private use 9
  12742. >20    lelong        157        (Private use 10
  12743. >20    lelong        158        (Private use 11
  12744. >20    lelong        159        (Private use 12
  12745. >20    lelong        160        (Private use 13
  12746. >20    lelong        161        (Private use 14
  12747. >20    lelong        162        (Private use 15
  12748. >20    lelong        163        (802.11 with AVS header
  12749. >16    lelong        x        \b, capture length %d)
  12750.  
  12751. #
  12752. # "libpcap"-with-Alexey-Kuznetsov's-patches capture files.
  12753. # (We call them "tcpdump capture file(s)" for now, as "tcpdump" is
  12754. # the main program that uses that format, but there are other programs
  12755. # that use "libpcap", or that use the same capture file format.)
  12756. #
  12757. 0    ubelong        0xa1b2cd34    extended tcpdump capture file (big-endian)
  12758. >4    beshort        x        - version %d
  12759. >6    beshort        x        \b.%d
  12760. >20    belong        0        (No link-layer encapsulation
  12761. >20    belong        1        (Ethernet
  12762. >20    belong        2        (3Mb Ethernet
  12763. >20    belong        3        (AX.25
  12764. >20    belong        4        (ProNET
  12765. >20    belong        5        (CHAOS
  12766. >20    belong        6        (Token Ring
  12767. >20    belong        7        (ARCNET
  12768. >20    belong        8        (SLIP
  12769. >20    belong        9        (PPP
  12770. >20    belong        10        (FDDI
  12771. >20    belong        11        (RFC 1483 ATM
  12772. >20    belong        12        (raw IP
  12773. >20    belong        13        (BSD/OS SLIP
  12774. >20    belong        14        (BSD/OS PPP
  12775. >16    belong        x        \b, capture length %d)
  12776. 0    ulelong        0xa1b2cd34    extended tcpdump capture file (little-endian)
  12777. >4    leshort        x        - version %d
  12778. >6    leshort        x        \b.%d
  12779. >20    lelong        0        (No link-layer encapsulation
  12780. >20    lelong        1        (Ethernet
  12781. >20    lelong        2        (3Mb Ethernet
  12782. >20    lelong        3        (AX.25
  12783. >20    lelong        4        (ProNET
  12784. >20    lelong        5        (CHAOS
  12785. >20    lelong        6        (Token Ring
  12786. >20    lelong        7        (ARCNET
  12787. >20    lelong        8        (SLIP
  12788. >20    lelong        9        (PPP
  12789. >20    lelong        10        (FDDI
  12790. >20    lelong        11        (RFC 1483 ATM
  12791. >20    lelong        12        (raw IP
  12792. >20    lelong        13        (BSD/OS SLIP
  12793. >20    lelong        14        (BSD/OS PPP
  12794. >16    lelong        x        \b, capture length %d)
  12795.  
  12796. #
  12797. # AIX "iptrace" capture files.
  12798. #
  12799. 0    string        iptrace\ 1.0    "iptrace" capture file
  12800. 0    string        iptrace\ 2.0    "iptrace" capture file
  12801.  
  12802. #
  12803. # Novell LANalyzer capture files.
  12804. #
  12805. 0    leshort        0x1001        LANalyzer capture file
  12806. 0    leshort        0x1007        LANalyzer capture file
  12807.  
  12808. #
  12809. # HP-UX "nettl" capture files.
  12810. #
  12811. 0    string        \x54\x52\x00\x64\x00    "nettl" capture file
  12812.  
  12813. #
  12814. # RADCOM WAN/LAN Analyzer capture files.
  12815. #
  12816. 0    string        \x42\xd2\x00\x34\x12\x66\x22\x88    RADCOM WAN/LAN Analyzer capture file
  12817.  
  12818. #
  12819. # NetStumbler log files.  Not really packets, per se, but about as
  12820. # close as you can get.  These are log files from NetStumbler, a
  12821. # Windows program, that scans for 802.11b networks.
  12822. #
  12823. 0    string        NetS        NetStumbler log file
  12824. >8    lelong        x        \b, %d stations found
  12825.  
  12826. #
  12827. # EtherPeek/AiroPeek "version 9" capture files.
  12828. #
  12829. 0    string        \177ver        EtherPeek/AiroPeek capture file
  12830.  
  12831. #
  12832. # Visual Networks traffic capture files.
  12833. #
  12834. 0    string        \x05VNF        Visual Networks traffic capture file
  12835.  
  12836. #
  12837. # Network Instruments Observer capture files.
  12838. #
  12839. 0    string        ObserverPktBuffe    Network Instruments Observer capture file
  12840.  
  12841. #
  12842. # Files from Accellent Group's 5View products.
  12843. #
  12844. 0    string        \xaa\xaa\xaa\xaa    5View capture file
  12845. #------------------------------------------------------------------------------
  12846. # softquad:  file(1) magic for SoftQuad Publishing Software
  12847. #
  12848. # Author/Editor and RulesBuilder
  12849. #
  12850. # XXX - byte order?
  12851. #
  12852. 0    string        \<!SQ\ DTD>    Compiled SGML rules file
  12853. >9    string        >\0         Type %s
  12854. 0    string        \<!SQ\ A/E>    A/E SGML Document binary
  12855. >9    string        >\0         Type %s
  12856. 0    string        \<!SQ\ STS>    A/E SGML binary styles file
  12857. >9    string        >\0         Type %s
  12858. 0    short        0xc0de        Compiled PSI (v1) data
  12859. 0    short        0xc0da        Compiled PSI (v2) data
  12860. >3    string        >\0        (%s)
  12861. # Binary sqtroff font/desc files...
  12862. 0    short        0125252        SoftQuad DESC or font file binary
  12863. >2    short        >0        - version %d
  12864. # Bitmaps...
  12865. 0    search/1    SQ\ BITMAP1    SoftQuad Raster Format text
  12866. #0    string        SQ\ BITMAP2    SoftQuad Raster Format data
  12867. # sqtroff intermediate language (replacement for ditroff int. lang.)
  12868. 0    string        X\         SoftQuad troff Context intermediate
  12869. >2    string        495        for AT&T 495 laser printer
  12870. >2    string        hp        for Hewlett-Packard LaserJet
  12871. >2    string        impr        for IMAGEN imPRESS
  12872. >2    string        ps        for PostScript
  12873.  
  12874. # From: Michael Piefel <piefel@debian.org>
  12875. # sqtroff intermediate language (replacement for ditroff int. lang.)
  12876. 0    string        X\ 495        SoftQuad troff Context intermediate for AT&T 495 laser printer
  12877. 0    string        X\ hp        SoftQuad troff Context intermediate for HP LaserJet
  12878. 0    string        X\ impr        SoftQuad troff Context intermediate for IMAGEN imPRESS
  12879. 0    string        X\ ps        SoftQuad troff Context intermediate for PostScript
  12880.  
  12881. #------------------------------------------------------------------------------
  12882. # spec:  file(1) magic for SPEC raw results (*.raw, *.rsf)
  12883. #
  12884. # Cloyce D. Spradling <cloyce@headgear.org>
  12885.  
  12886. 0    string    spec            SPEC
  12887. >4    string    .cpu            CPU
  12888. >>8    string    <:            \b%.4s
  12889. >>12    string    .            raw result text
  12890.  
  12891. 17    string    version=SPECjbb        SPECjbb
  12892. >32    string    <:            \b%.4s
  12893. >>37    string    <:            v%.4s raw result text
  12894.  
  12895. 0    string    BEGIN\040SPECWEB    SPECweb
  12896. >13    string    <:            \b%.2s
  12897. >>15    string    _SSL            \b_SSL
  12898. >>>20    string    <:            v%.4s raw result text
  12899. >>16    string    <:            v%.4s raw result text
  12900.  
  12901. #------------------------------------------------------------------------------
  12902. # spectrum:  file(1) magic for Spectrum emulator files.
  12903. #
  12904. # John Elliott <jce@seasip.demon.co.uk>
  12905.  
  12906. #
  12907. # Spectrum +3DOS header
  12908. #
  12909. 0       string          PLUS3DOS\032    Spectrum +3 data
  12910. >15     byte            0               - BASIC program
  12911. >15     byte            1               - number array
  12912. >15     byte            2               - character array
  12913. >15     byte            3               - memory block
  12914. >>16    belong          0x001B0040      (screen)
  12915. >15     byte            4               - Tasword document
  12916. >15     string          TAPEFILE        - ZXT tapefile
  12917. #
  12918. # Tape file. This assumes the .TAP starts with a Spectrum-format header,
  12919. # which nearly all will.
  12920. #
  12921. 0       string          \023\000\000    Spectrum .TAP data
  12922. >4      string          x               "%-10.10s"
  12923. >3      byte            0               - BASIC program
  12924. >3      byte            1               - number array
  12925. >3      byte            2               - character array
  12926. >3      byte            3               - memory block
  12927. >>14    belong          0x001B0040      (screen)
  12928.  
  12929. # The following three blocks are from pak21-spectrum@srcf.ucam.org
  12930. # TZX tape images
  12931. 0      string          ZXTape!\x1a     Spectrum .TZX data
  12932. >8     byte            x               version %d
  12933. >9     byte            x               \b.%d
  12934.  
  12935. # RZX input recording files
  12936. 0      string          RZX!            Spectrum .RZX data
  12937. >4     byte            x               version %d
  12938. >5     byte            x               \b.%d
  12939.  
  12940. # Floppy disk images
  12941. 0      string          MV\ -\ CPCEMU\ Disk-Fil Amstrad/Spectrum .DSK data
  12942. 0      string          MV\ -\ CPC\ format\ Dis Amstrad/Spectrum DU54 .DSK data
  12943. 0      string          EXTENDED\ CPC\ DSK\ Fil Amstrad/Spectrum Extended .DSK data
  12944. 0      string          SINCLAIR        Spectrum .SCL Betadisk image
  12945.  
  12946. # Hard disk images
  12947. 0      string          RS-IDE\x1a      Spectrum .HDF hard disk image
  12948. >7     byte            x               \b, version 0x%02x
  12949.  
  12950. #------------------------------------------------------------------------------
  12951. # sql:  file(1) magic for SQL files
  12952. #
  12953. # From: "Marty Leisner" <mleisner@eng.mc.xerox.com>
  12954. # Recognize some MySQL files.
  12955. #
  12956. 0    beshort            0xfe01        MySQL table definition file
  12957. >2    byte            x        Version %d
  12958. 0    belong&0xffffff00    0xfefe0300    MySQL MISAM index file
  12959. >3    byte            x        Version %d
  12960. 0    belong&0xffffff00    0xfefe0700    MySQL MISAM compressed data file
  12961. >3    byte            x        Version %d
  12962. 0    belong&0xffffff00    0xfefe0500    MySQL ISAM index file
  12963. >3    byte            x        Version %d
  12964. 0    belong&0xffffff00    0xfefe0600    MySQL ISAM compressed data file
  12965. >3    byte            x        Version %d
  12966. 0    string             \376bin        MySQL replication log
  12967.  
  12968. #------------------------------------------------------------------------------
  12969. # iRiver H Series database file 
  12970. # From Ken Guest <ken@linux.ie>
  12971. # As observed from iRivNavi.iDB and unencoded firmware
  12972. #
  12973. 0   string        iRivDB    iRiver Database file
  12974. >11  string    >\0    Version %s
  12975. >39  string        iHP-100    [H Series]
  12976.  
  12977. #------------------------------------------------------------------------------
  12978. # SQLite database files
  12979. # Ken Guest <ken@linux.ie>, Ty Sarna, Zack Weinberg
  12980. #
  12981. # Version 1 used GDBM internally; its files cannot be distinguished
  12982. # from other GDBM files.
  12983. #
  12984. # Version 2 used this format:
  12985. 0    string    **\ This\ file\ contains\ an\ SQLite  SQLite 2.x database
  12986.  
  12987. # Version 3 of SQLite allows applications to embed their own "user version"
  12988. # number in the database.  Detect this and distinguish those files.
  12989.  
  12990. 0   string  SQLite\ format\ 3
  12991. >60 string  _MTN               Monotone source repository
  12992. >60 belong  !0                 SQLite 3.x database, user version %u
  12993. >60 belong  0                  SQLite 3.x database
  12994.  
  12995. #------------------------------------------------------------------------------
  12996. # sun:  file(1) magic for Sun machines
  12997. #
  12998. # Values for big-endian Sun (MC680x0, SPARC) binaries on pre-5.x
  12999. # releases.  (5.x uses ELF.)
  13000. #
  13001. 0    belong&077777777    0600413        sparc demand paged
  13002. >0    byte        &0x80
  13003. >>20    belong        <4096        shared library
  13004. >>20    belong        =4096        dynamically linked executable
  13005. >>20    belong        >4096        dynamically linked executable
  13006. >0    byte        ^0x80        executable
  13007. >16    belong        >0        not stripped
  13008.  
  13009. 0    belong&077777777    0600410        sparc pure
  13010. >0    byte        &0x80        dynamically linked executable
  13011. >0    byte        ^0x80        executable
  13012. >16    belong        >0        not stripped
  13013.  
  13014. 0    belong&077777777    0600407        sparc
  13015. >0    byte        &0x80        dynamically linked executable
  13016. >0    byte        ^0x80        executable
  13017. >16    belong        >0        not stripped
  13018.  
  13019. 0    belong&077777777    0400413        mc68020 demand paged
  13020. >0    byte        &0x80
  13021. >>20    belong        <4096        shared library
  13022. >>20    belong        =4096        dynamically linked executable
  13023. >>20    belong        >4096        dynamically linked executable
  13024. >0    byte        ^0x80        executable
  13025. >16    belong        >0        not stripped
  13026.  
  13027. 0    belong&077777777    0400410        mc68020 pure
  13028. >0    byte        &0x80        dynamically linked executable
  13029. >0    byte        ^0x80        executable
  13030. >16    belong        >0        not stripped
  13031.  
  13032. 0    belong&077777777    0400407        mc68020
  13033. >0    byte        &0x80        dynamically linked executable
  13034. >0    byte        ^0x80        executable
  13035. >16    belong        >0        not stripped
  13036.  
  13037. 0    belong&077777777    0200413        mc68010 demand paged
  13038. >0    byte        &0x80
  13039. >>20    belong        <4096        shared library
  13040. >>20    belong        =4096        dynamically linked executable
  13041. >>20    belong        >4096        dynamically linked executable
  13042. >0    byte        ^0x80        executable
  13043. >16    belong        >0        not stripped
  13044.  
  13045. 0    belong&077777777    0200410        mc68010 pure
  13046. >0    byte        &0x80        dynamically linked executable
  13047. >0    byte        ^0x80        executable
  13048. >16    belong        >0        not stripped
  13049.  
  13050. 0    belong&077777777    0200407        mc68010
  13051. >0    byte        &0x80        dynamically linked executable
  13052. >0    byte        ^0x80        executable
  13053. >16    belong        >0        not stripped
  13054.  
  13055. # reworked these to avoid anything beginning with zero becoming "old sun-2"
  13056. 0    belong        0407        old sun-2 executable
  13057. >16    belong        >0        not stripped
  13058. 0    belong        0410        old sun-2 pure executable
  13059. >16    belong        >0        not stripped
  13060. 0    belong        0413        old sun-2 demand paged executable
  13061. >16    belong        >0        not stripped
  13062.  
  13063. #
  13064. # Core files.  "SPARC 4.x BCP" means "core file from a SunOS 4.x SPARC
  13065. # binary executed in compatibility mode under SunOS 5.x".
  13066. #
  13067. 0    belong        0x080456    SunOS core file
  13068. >4    belong        432        (SPARC)
  13069. >>132    string        >\0        from '%s'
  13070. >>116    belong        =3        (quit)
  13071. >>116    belong        =4        (illegal instruction)
  13072. >>116    belong        =5        (trace trap)
  13073. >>116    belong        =6        (abort)
  13074. >>116    belong        =7        (emulator trap)
  13075. >>116    belong        =8        (arithmetic exception)
  13076. >>116    belong        =9        (kill)
  13077. >>116    belong        =10        (bus error)
  13078. >>116    belong        =11        (segmentation violation)
  13079. >>116    belong        =12        (bad argument to system call)
  13080. >>116    belong        =29        (resource lost)
  13081. >>120    belong        x        (T=%dK,
  13082. >>124    belong        x        D=%dK,
  13083. >>128    belong        x        S=%dK)
  13084. >4    belong        826        (68K)
  13085. >>128    string        >\0        from '%s'
  13086. >4    belong        456        (SPARC 4.x BCP)
  13087. >>152    string        >\0        from '%s'
  13088. # Sun SunPC
  13089. 0    long        0xfa33c08e    SunPC 4.0 Hard Disk
  13090. 0    string        #SUNPC_CONFIG    SunPC 4.0 Properties Values
  13091. # Sun snoop (see RFC 1761, which describes the capture file format).
  13092. #
  13093. 0    string        snoop        Snoop capture file
  13094. >8    belong        >0        - version %ld
  13095. >12    belong        0        (IEEE 802.3)
  13096. >12    belong        1        (IEEE 802.4)
  13097. >12    belong        2        (IEEE 802.5)
  13098. >12    belong        3        (IEEE 802.6)
  13099. >12    belong        4        (Ethernet)
  13100. >12    belong        5        (HDLC)
  13101. >12    belong        6        (Character synchronous)
  13102. >12    belong        7        (IBM channel-to-channel adapter)
  13103. >12    belong        8        (FDDI)
  13104. >12    belong        9        (Unknown)
  13105.  
  13106. # Microsoft ICM color profile
  13107. 36    string        acspMSFT    Microsoft ICM Color Profile
  13108. # Sun KCMS
  13109. 36    string        acsp        Kodak Color Management System, ICC Profile
  13110.  
  13111. #---------------------------------------------------------------------------
  13112. # The following entries have been tested by Duncan Laurie <duncan@sun.com> (a
  13113. # lead Sun/Cobalt developer) who agrees that they are good and worthy of
  13114. # inclusion.
  13115.  
  13116. # Boot ROM images for Sun/Cobalt Linux server appliances
  13117. 0       string  Cobalt\ Networks\ Inc.\nFirmware\ v     Paged COBALT boot rom
  13118. >38     string x        V%.4s
  13119.  
  13120. # New format for Sun/Cobalt boot ROMs is annoying, it stores the version code
  13121. # at the very end where file(1) can't get it.
  13122. 0       string CRfs     COBALT boot rom data (Flat boot rom or file system)
  13123.  
  13124.  
  13125. #------------------------------------------------------------------------
  13126. # sysex: file(1) magic for MIDI sysex files
  13127. #
  13128. 0    byte            0xF0        SysEx File -
  13129.  
  13130. # North American Group
  13131. >1    byte            0x01        Sequential
  13132. >1    byte            0x02        IDP
  13133. >1    byte            0x03        OctavePlateau
  13134. >1    byte            0x04        Moog
  13135. >1    byte            0x05        Passport
  13136. >1    byte            0x06        Lexicon
  13137. >1    byte            0x07        Kurzweil/Future Retro
  13138. >>3    byte            0x77        777
  13139. >>4    byte            0x00        Bank
  13140. >>4    byte            0x01        Song
  13141. >>5    byte            0x0f        16
  13142. >>5    byte            0x0e        15
  13143. >>5    byte            0x0d        14
  13144. >>5    byte            0x0c        13
  13145. >>5    byte            0x0b        12
  13146. >>5    byte            0x0a        11
  13147. >>5    byte            0x09        10
  13148. >>5    byte            0x08        9
  13149. >>5    byte            0x07        8
  13150. >>5    byte            0x06        7
  13151. >>5    byte            0x05        6
  13152. >>5    byte            0x04        5
  13153. >>5    byte            0x03        4
  13154. >>5    byte            0x02        3
  13155. >>5    byte            0x01        2
  13156. >>5    byte            0x00        1
  13157. >>5    byte            0x10        (ALL)
  13158. >>2    byte            x            \b, Channel %d
  13159. >1    byte            0x08        Fender
  13160. >1    byte            0x09        Gulbransen
  13161. >1    byte            0x0a        AKG
  13162. >1    byte            0x0b        Voyce
  13163. >1    byte            0x0c        Waveframe
  13164. >1    byte            0x0d        ADA
  13165. >1    byte            0x0e        Garfield
  13166. >1    byte            0x0f        Ensoniq
  13167. >1    byte            0x10        Oberheim
  13168. >>2    byte            0x06        Matrix 6 series
  13169. >>3    byte            0x0A        Dump (All)
  13170. >>3    byte            0x01        Dump (Bank)
  13171. >>4 belong            0x0002040E        Matrix 1000
  13172. >>>11 byte            <2            User bank %d
  13173. >>>11 byte            >1            Preset bank %d
  13174. >1    byte            0x11        Apple
  13175. >1    byte            0x12        GreyMatter
  13176. >1    byte            0x14        PalmTree
  13177. >1    byte            0x15        JLCooper
  13178. >1    byte            0x16        Lowrey
  13179. >1    byte            0x17        AdamsSmith
  13180. >1    byte            0x18        E-mu
  13181. >1    byte            0x19        Harmony
  13182. >1    byte            0x1a        ART
  13183. >1    byte            0x1b        Baldwin
  13184. >1    byte            0x1c        Eventide
  13185. >1    byte            0x1d        Inventronics
  13186. >1    byte            0x1f        Clarity
  13187.  
  13188. # European Group
  13189. >1    byte            0x21        SIEL
  13190. >1    byte            0x22        Synthaxe
  13191. >1    byte            0x24        Hohner
  13192. >1    byte            0x25        Twister
  13193. >1    byte            0x26        Solton
  13194. >1    byte            0x27        Jellinghaus
  13195. >1    byte            0x28        Southworth
  13196. >1    byte            0x29        PPG
  13197. >1    byte            0x2a        JEN
  13198. >1    byte            0x2b        SSL
  13199. >1    byte            0x2c        AudioVertrieb
  13200.  
  13201. >1    byte            0x2f        ELKA
  13202. >>3    byte            0x09        EK-44
  13203.  
  13204. >1    byte            0x30        Dynacord
  13205. >1    byte            0x31        Jomox
  13206. >1    byte            0x33        Clavia
  13207. >1    byte            0x39        Soundcraft
  13208. # Some Waldorf info from http://Stromeko.Synth.net/Downloads#WaldorfDocs
  13209. >1    byte            0x3e        Waldorf
  13210. >>2    byte            0x00        microWave
  13211. >>2    byte            0x0E        microwave2 / XT
  13212. >>2    byte            0x0F        Q / Q+
  13213. >>3    byte            =0            (default id)
  13214. >>3 byte            >0            (
  13215. >>>3 byte            <0x7F        \bdevice %d)
  13216. >>>3 byte            =0x7F        \bbroadcast id)
  13217. >>3    byte            0x7f        Microwave I
  13218. >>>4    byte            0x00        SNDR (Sound Request)
  13219. >>>4    byte            0x10        SNDD (Sound Dump)
  13220. >>>4    byte            0x20        SNDP (Sound Parameter Change)
  13221. >>>4    byte            0x30        SNDQ (Sound Parameter Inquiry)
  13222. >>>4    byte            0x70        BOOT (Sound Reserved)
  13223. >>>4    byte            0x01        MULR (Multi Request)
  13224. >>>4    byte            0x11        MULD (Multi Dump)
  13225. >>>4    byte            0x21        MULP (Multi Parameter Change)
  13226. >>>4    byte            0x31        MULQ (Multi Parameter Inquiry)
  13227. >>>4    byte            0x71        OS (Multi Reserved)
  13228. >>>4    byte            0x02        DRMR (Drum Map Request)
  13229. >>>4    byte            0x12        DRMD (Drum Map Dump)
  13230. >>>4    byte            0x22        DRMP (Drum Map Parameter Change)
  13231. >>>4    byte            0x32        DRMQ (Drum Map Parameter Inquiry)
  13232. >>>4    byte            0x72        BIN (Drum Map Reserved)
  13233. >>>4    byte            0x03        PATR (Sequencer Pattern Request)
  13234. >>>4    byte            0x13        PATD (Sequencer Pattern Dump)
  13235. >>>4    byte            0x23        PATP (Sequencer Pattern Parameter Change)
  13236. >>>4    byte            0x33        PATQ (Sequencer Pattern Parameter Inquiry)
  13237. >>>4    byte            0x73        AFM (Sequencer Pattern Reserved)
  13238. >>>4    byte            0x04        GLBR (Global Parameter Request)
  13239. >>>4    byte            0x14        GLBD (Global Parameter Dump)
  13240. >>>4    byte            0x24        GLBP (Global Parameter Parameter Change)
  13241. >>>4    byte            0x34        GLBQ (Global Parameter Parameter Inquiry)
  13242. >>>4    byte            0x07        MODR (Mode Parameter Request)
  13243. >>>4    byte            0x17        MODD (Mode Parameter Dump)
  13244. >>>4    byte            0x27        MODP (Mode Parameter Parameter Change)
  13245. >>>4    byte            0x37        MODQ (Mode Parameter Parameter Inquiry)
  13246. >>2    byte            0x10        microQ
  13247. >>>4    byte            0x00        SNDR (Sound Request)
  13248. >>>4    byte            0x10        SNDD (Sound Dump)
  13249. >>>4    byte            0x20        SNDP (Sound Parameter Change)
  13250. >>>4    byte            0x30        SNDQ (Sound Parameter Inquiry)
  13251. >>>4    byte            0x70        (Sound Reserved)
  13252. >>>4    byte            0x01        MULR (Multi Request)
  13253. >>>4    byte            0x11        MULD (Multi Dump)
  13254. >>>4    byte            0x21        MULP (Multi Parameter Change)
  13255. >>>4    byte            0x31        MULQ (Multi Parameter Inquiry)
  13256. >>>4    byte            0x71        OS (Multi Reserved)
  13257. >>>4    byte            0x02        DRMR (Drum Map Request)
  13258. >>>4    byte            0x12        DRMD (Drum Map Dump)
  13259. >>>4    byte            0x22        DRMP (Drum Map Parameter Change)
  13260. >>>4    byte            0x32        DRMQ (Drum Map Parameter Inquiry)
  13261. >>>4    byte            0x72        BIN (Drum Map Reserved)
  13262. >>>4    byte            0x04        GLBR (Global Parameter Request)
  13263. >>>4    byte            0x14        GLBD (Global Parameter Dump)
  13264. >>>4    byte            0x24        GLBP (Global Parameter Parameter Change)
  13265. >>>4    byte            0x34        GLBQ (Global Parameter Parameter Inquiry)
  13266. >>2    byte            0x11        rackAttack
  13267. >>>4    byte            0x00        SNDR (Sound Parameter Request)
  13268. >>>4    byte            0x10        SNDD (Sound Parameter Dump)
  13269. >>>4    byte            0x20        SNDP (Sound Parameter Parameter Change)
  13270. >>>4    byte            0x30        SNDQ (Sound Parameter Parameter Inquiry)
  13271. >>>4    byte            0x01        PRGR (Program Parameter Request)
  13272. >>>4    byte            0x11        PRGD (Program Parameter Dump)
  13273. >>>4    byte            0x21        PRGP (Program Parameter Parameter Change)
  13274. >>>4    byte            0x31        PRGQ (Program Parameter Parameter Inquiry)
  13275. >>>4    byte            0x71        OS (Program Parameter Reserved)
  13276. >>>4    byte            0x03        PATR (Pattern Parameter Request)
  13277. >>>4    byte            0x13        PATD (Pattern Parameter Dump)
  13278. >>>4    byte            0x23        PATP (Pattern Parameter Parameter Change)
  13279. >>>4    byte            0x33        PATQ (Pattern Parameter Parameter Inquiry)
  13280. >>>4    byte            0x04        GLBR (Global Parameter Request)
  13281. >>>4    byte            0x14        GLBD (Global Parameter Dump)
  13282. >>>4    byte            0x24        GLBP (Global Parameter Parameter Change)
  13283. >>>4    byte            0x34        GLBQ (Global Parameter Parameter Inquiry)
  13284. >>>4    byte            0x05        EFXR (FX Parameter Request)
  13285. >>>4    byte            0x15        EFXD (FX Parameter Dump)
  13286. >>>4    byte            0x25        EFXP (FX Parameter Parameter Change)
  13287. >>>4    byte            0x35        EFXQ (FX Parameter Parameter Inquiry)
  13288. >>>4    byte            0x07        MODR (Mode Command Request)
  13289. >>>4    byte            0x17        MODD (Mode Command Dump)
  13290. >>>4    byte            0x27        MODP (Mode Command Parameter Change)
  13291. >>>4    byte            0x37        MODQ (Mode Command Parameter Inquiry)
  13292. >>2    byte            0x03        Wave
  13293. >>>4    byte            0x00        SBPR (Soundprogram)
  13294. >>>4    byte            0x01        SAPR (Performance)
  13295. >>>4    byte            0x02        SWAVE (Wave)
  13296. >>>4    byte            0x03        SWTBL (Wave control table)
  13297. >>>4    byte            0x04        SVT (Velocity Curve)
  13298. >>>4    byte            0x05        STT (Tuning Table)
  13299. >>>4    byte            0x06        SGLB (Global Parameters)
  13300. >>>4    byte            0x07        SARRMAP (Performance Program Change Map)
  13301. >>>4    byte            0x08        SBPRMAP (Sound Program Change Map)
  13302. >>>4    byte            0x09        SBPRPAR (Sound Parameter)
  13303. >>>4    byte            0x0A        SARRPAR (Performance Parameter)
  13304. >>>4    byte            0x0B        SINSPAR (Instrument/External Parameter)
  13305. >>>4    byte            0x0F        SBULK (Bulk Switch on/off)
  13306.  
  13307. # Japanese Group
  13308. >1    byte            0x40        Kawai
  13309. >>3    byte            0x20        K1
  13310. >>3    byte            0x22        K4
  13311.  
  13312. >1    byte            0x41        Roland
  13313. >>3    byte            0x14        D-50
  13314. >>3    byte            0x2b        U-220
  13315. >>3    byte            0x02        TR-707
  13316.  
  13317. >1    byte            0x42        Korg
  13318. >>3    byte            0x19        M1
  13319.  
  13320. >1    byte            0x43        Yamaha
  13321. >1    byte            0x44        Casio
  13322. >1    byte            0x46        Kamiya
  13323. >1    byte            0x47        Akai
  13324. >1    byte            0x48        Victor
  13325. >1    byte            0x49        Mesosha
  13326. >1    byte            0x4b        Fujitsu
  13327. >1    byte            0x4c        Sony
  13328. >1    byte            0x4e        Teac
  13329. >1    byte            0x50        Matsushita
  13330. >1    byte            0x51        Fostex
  13331. >1    byte            0x52        Zoom
  13332. >1    byte            0x54        Matsushita
  13333. >1    byte            0x57        Acoustic tech. lab.
  13334.  
  13335. >1    belong&0xffffff00    0x00007400    Ta Horng
  13336. >1    belong&0xffffff00    0x00007500    e-Tek
  13337. >1    belong&0xffffff00    0x00007600    E-Voice
  13338. >1    belong&0xffffff00    0x00007700    Midisoft
  13339. >1    belong&0xffffff00    0x00007800    Q-Sound
  13340. >1    belong&0xffffff00    0x00007900    Westrex
  13341. >1    belong&0xffffff00    0x00007a00    Nvidia*
  13342. >1    belong&0xffffff00    0x00007b00    ESS
  13343. >1    belong&0xffffff00    0x00007c00    Mediatrix
  13344. >1    belong&0xffffff00    0x00007d00    Brooktree
  13345. >1    belong&0xffffff00    0x00007e00    Otari
  13346. >1    belong&0xffffff00    0x00007f00    Key Electronics
  13347. >1    belong&0xffffff00    0x00010000    Shure
  13348. >1    belong&0xffffff00    0x00010100    AuraSound
  13349. >1    belong&0xffffff00    0x00010200    Crystal
  13350. >1    belong&0xffffff00    0x00010300    Rockwell
  13351. >1    belong&0xffffff00    0x00010400    Silicon Graphics
  13352. >1    belong&0xffffff00    0x00010500    Midiman
  13353. >1    belong&0xffffff00    0x00010600    PreSonus
  13354. >1    belong&0xffffff00    0x00010800    Topaz
  13355. >1    belong&0xffffff00    0x00010900    Cast Lightning
  13356. >1    belong&0xffffff00    0x00010a00    Microsoft
  13357. >1    belong&0xffffff00    0x00010b00    Sonic Foundry
  13358. >1    belong&0xffffff00    0x00010c00    Line 6
  13359. >1    belong&0xffffff00    0x00010d00    Beatnik Inc.
  13360. >1    belong&0xffffff00    0x00010e00    Van Koerving
  13361. >1    belong&0xffffff00    0x00010f00    Altech Systems
  13362. >1    belong&0xffffff00    0x00011000    S & S Research
  13363. >1    belong&0xffffff00    0x00011100    VLSI Technology
  13364. >1    belong&0xffffff00    0x00011200    Chromatic
  13365. >1    belong&0xffffff00    0x00011300    Sapphire
  13366. >1    belong&0xffffff00    0x00011400    IDRC
  13367. >1    belong&0xffffff00    0x00011500    Justonic Tuning
  13368. >1    belong&0xffffff00    0x00011600    TorComp
  13369. >1    belong&0xffffff00    0x00011700    Newtek Inc.
  13370. >1    belong&0xffffff00    0x00011800    Sound Sculpture
  13371. >1    belong&0xffffff00    0x00011900    Walker Technical
  13372. >1    belong&0xffffff00    0x00011a00    Digital Harmony
  13373. >1    belong&0xffffff00    0x00011b00    InVision
  13374. >1    belong&0xffffff00    0x00011c00    T-Square
  13375. >1    belong&0xffffff00    0x00011d00    Nemesys
  13376. >1    belong&0xffffff00    0x00011e00    DBX
  13377. >1    belong&0xffffff00    0x00011f00    Syndyne
  13378. >1    belong&0xffffff00    0x00012000    Bitheadz    
  13379. >1    belong&0xffffff00    0x00012100    Cakewalk
  13380. >1    belong&0xffffff00    0x00012200    Staccato
  13381. >1    belong&0xffffff00    0x00012300    National Semicon.
  13382. >1    belong&0xffffff00    0x00012400    Boom Theory
  13383. >1    belong&0xffffff00    0x00012500    Virtual DSP Corp
  13384. >1    belong&0xffffff00    0x00012600    Antares
  13385. >1    belong&0xffffff00    0x00012700    Angel Software
  13386. >1    belong&0xffffff00    0x00012800    St Louis Music
  13387. >1    belong&0xffffff00    0x00012900    Lyrrus dba G-VOX
  13388. >1    belong&0xffffff00    0x00012a00    Ashley Audio
  13389. >1    belong&0xffffff00    0x00012b00    Vari-Lite
  13390. >1    belong&0xffffff00    0x00012c00    Summit Audio
  13391. >1    belong&0xffffff00    0x00012d00    Aureal Semicon.
  13392. >1    belong&0xffffff00    0x00012e00    SeaSound
  13393. >1    belong&0xffffff00    0x00012f00    U.S. Robotics
  13394. >1    belong&0xffffff00    0x00013000    Aurisis
  13395. >1    belong&0xffffff00    0x00013100    Nearfield Multimedia
  13396. >1    belong&0xffffff00    0x00013200    FM7 Inc.
  13397. >1    belong&0xffffff00    0x00013300    Swivel Systems
  13398. >1    belong&0xffffff00    0x00013400    Hyperactive
  13399. >1    belong&0xffffff00    0x00013500    MidiLite
  13400. >1    belong&0xffffff00    0x00013600    Radical
  13401. >1    belong&0xffffff00    0x00013700    Roger Linn
  13402. >1    belong&0xffffff00    0x00013800    Helicon
  13403. >1    belong&0xffffff00    0x00013900    Event
  13404. >1    belong&0xffffff00    0x00013a00    Sonic Network
  13405. >1    belong&0xffffff00    0x00013b00    Realtime Music
  13406. >1    belong&0xffffff00    0x00013c00    Apogee Digital
  13407.  
  13408. >1    belong&0xffffff00    0x00202b00    Medeli Electronics
  13409. >1    belong&0xffffff00    0x00202c00    Charlie Lab
  13410. >1    belong&0xffffff00    0x00202d00    Blue Chip Music
  13411. >1    belong&0xffffff00    0x00202e00    BEE OH Corp
  13412. >1    belong&0xffffff00    0x00202f00    LG Semicon America
  13413. >1    belong&0xffffff00    0x00203000    TESI
  13414. >1    belong&0xffffff00    0x00203100    EMAGIC
  13415. >1    belong&0xffffff00    0x00203200    Behringer
  13416. >1    belong&0xffffff00    0x00203300    Access Music
  13417. >1    belong&0xffffff00    0x00203400    Synoptic
  13418. >1    belong&0xffffff00    0x00203500    Hanmesoft Corp
  13419. >1    belong&0xffffff00    0x00203600    Terratec
  13420. >1    belong&0xffffff00    0x00203700    Proel SpA
  13421. >1    belong&0xffffff00    0x00203800    IBK MIDI
  13422. >1    belong&0xffffff00    0x00203900    IRCAM
  13423. >1    belong&0xffffff00    0x00203a00    Propellerhead Software
  13424. >1    belong&0xffffff00    0x00203b00    Red Sound Systems
  13425. >1    belong&0xffffff00    0x00203c00    Electron ESI AB
  13426. >1    belong&0xffffff00    0x00203d00    Sintefex Audio
  13427. >1    belong&0xffffff00    0x00203e00    Music and More
  13428. >1    belong&0xffffff00    0x00203f00    Amsaro
  13429. >1    belong&0xffffff00    0x00204000    CDS Advanced Technology
  13430. >1    belong&0xffffff00    0x00204100    Touched by Sound
  13431. >1    belong&0xffffff00    0x00204200    DSP Arts
  13432. >1    belong&0xffffff00    0x00204300    Phil Rees Music
  13433. >1    belong&0xffffff00    0x00204400    Stamer Musikanlagen GmbH
  13434. >1    belong&0xffffff00    0x00204500    Soundart
  13435. >1    belong&0xffffff00    0x00204600    C-Mexx Software
  13436. >1    belong&0xffffff00    0x00204700    Klavis Tech.
  13437. >1    belong&0xffffff00    0x00204800    Noteheads AB
  13438.  
  13439. 0    string            T707        Roland TR-707 Data
  13440. #------------------------------------------------------------------------------
  13441. # teapot:  file(1) magic for "teapot" spreadsheet
  13442. #
  13443. 0       string          #!teapot\012xdr      teapot work sheet (XDR format)
  13444.  
  13445. #------------------------------------------------------------------------------
  13446. # terminfo:  file(1) magic for terminfo
  13447. #
  13448. # XXX - byte order for screen images?
  13449. #
  13450. 0    string        \032\001    Compiled terminfo entry
  13451. 0    short        0433        Curses screen image
  13452. 0    short        0434        Curses screen image
  13453. #------------------------------------------------------------------------------
  13454. # tex:  file(1) magic for TeX files
  13455. #
  13456. # XXX - needs byte-endian stuff (big-endian and little-endian DVI?)
  13457. #
  13458. # From <conklin@talisman.kaleida.com>
  13459.  
  13460. # Although we may know the offset of certain text fields in TeX DVI
  13461. # and font files, we can't use them reliably because they are not
  13462. # zero terminated. [but we do anyway, christos]
  13463. 0    string        \367\002    TeX DVI file
  13464. !:mime    application/x-dvi
  13465. >16    string        >\0        (%s)
  13466. 0    string        \367\203    TeX generic font data
  13467. 0    string        \367\131    TeX packed font data
  13468. >3    string        >\0        (%s)
  13469. 0    string        \367\312    TeX virtual font data
  13470. 0    search/1    This\ is\ TeX,    TeX transcript text
  13471. 0    search/1    This\ is\ METAFONT,    METAFONT transcript text
  13472.  
  13473. # There is no way to detect TeX Font Metric (*.tfm) files without
  13474. # breaking them apart and reading the data.  The following patterns
  13475. # match most *.tfm files generated by METAFONT or afm2tfm.
  13476. 2    string        \000\021    TeX font metric data
  13477. !:mime    application/x-tex-tfm
  13478. >33    string        >\0        (%s)
  13479. 2    string        \000\022    TeX font metric data
  13480. !:mime    application/x-tex-tfm
  13481. >33    string        >\0        (%s)
  13482.  
  13483. # Texinfo and GNU Info, from Daniel Quinlan (quinlan@yggdrasil.com)
  13484. 0    search/1    \\input\ texinfo    Texinfo source text
  13485. !:mime    text/x-texinfo
  13486. 0    search/1    This\ is\ Info\ file    GNU Info text
  13487. !:mime    text/x-info
  13488.  
  13489. # TeX documents, from Daniel Quinlan (quinlan@yggdrasil.com)
  13490. 0    search/400    \\input        TeX document text
  13491. !:mime    text/x-tex
  13492. 0    search/400    \\section    LaTeX document text
  13493. !:mime    text/x-tex
  13494. 0    search/400    \\setlength    LaTeX document text
  13495. !:mime    text/x-tex
  13496. 0    search/400    \\documentstyle    LaTeX document text
  13497. !:mime    text/x-tex
  13498. 0    search/400    \\chapter    LaTeX document text
  13499. !:mime    text/x-tex
  13500. 0    search/400    \\documentclass    LaTeX 2e document text
  13501. !:mime    text/x-tex
  13502. 0    search/400    \\relax        LaTeX auxiliary file
  13503. !:mime    text/x-tex
  13504. 0    search/400    \\contentsline    LaTeX table of contents
  13505. !:mime    text/x-tex
  13506. 0    search/400    %\ -*-latex-*-    LaTeX document text
  13507. !:mime    text/x-tex
  13508.  
  13509. # Tex document, from Hendrik Scholz <hendrik@scholz.net>
  13510. 0       search/1    \\ifx        TeX document text
  13511.  
  13512. # Index and glossary files
  13513. 0    search/400    \\indexentry    LaTeX raw index file
  13514. 0    search/400    \\begin{theindex}    LaTeX sorted index
  13515. 0    search/400    \\glossaryentry    LaTeX raw glossary
  13516. 0    search/400    \\begin{theglossary}    LaTeX sorted glossary
  13517. 0    search/400    This\ is\ makeindex    Makeindex log file
  13518.  
  13519. # End of TeX
  13520.  
  13521. #------------------------------------------------------------------------------
  13522. # file(1) magic for BibTex text files
  13523. # From Hendrik Scholz <hendrik@scholz.net>
  13524.  
  13525. 0    search/1/c    @article{    BibTeX text file
  13526. 0    search/1/c    @book{        BibTeX text file
  13527. 0    search/1/c    @inbook{    BibTeX text file
  13528. 0    search/1/c    @incollection{    BibTeX text file
  13529. 0    search/1/c    @inproceedings{    BibTeX text file
  13530. 0    search/1/c    @manual{    BibTeX text file
  13531. 0    search/1/c    @misc{        BibTeX text file
  13532. 0    search/1/c    @preamble{    BibTeX text file
  13533. 0    search/1/c    @phdthesis{    BibTeX text file
  13534. 0    search/1/c    @techreport{    BibTeX text file
  13535. 0    search/1/c    @unpublished{    BibTeX text file
  13536.  
  13537. 73    search/1    %%%\ \         BibTeX-file{ BibTex text file (with full header)
  13538.  
  13539. 73    search/1    %%%\ \ @BibTeX-style-file{   BibTeX style text file (with full header)
  13540.  
  13541. 0    search/1    %\ BibTeX\ standard\ bibliography\     BibTeX standard bibliography style text file
  13542.  
  13543. 0    search/1    %\ BibTeX\ `    BibTeX custom bibliography style text file
  13544.  
  13545. 0    search/1    @c\ @mapfile{    TeX font aliases text file
  13546. #------------------------------------------------------------------------------
  13547. # file(1) magic for tgif(1) files
  13548. # From Hendrik Scholz <hendrik@scholz.net>
  13549.  
  13550. 0    string    %TGIF\ x         Tgif file version %s
  13551.  
  13552. # ------------------------------------------------------------------------
  13553. # ti-8x: file(1) magic for the TI-8x and TI-9x Graphing Calculators.
  13554. #
  13555. # From: Ryan McGuire (rmcguire@freenet.columbus.oh.us).
  13556. #
  13557. # Update: Romain Lievin (roms@lpg.ticalc.org).
  13558. #
  13559. # NOTE: This list is not complete.
  13560. # Files for the TI-80 and TI-81 are pretty rare. I'm not going to put the
  13561. # program/group magic numbers in here because I cannot find any.
  13562. 0        string        **TI80**    TI-80 Graphing Calculator File.
  13563. 0        string        **TI81**    TI-81 Graphing Calculator File.
  13564. #
  13565. # Magic Numbers for the TI-73
  13566. #
  13567. 0        string        **TI73**    TI-73 Graphing Calculator
  13568. >0x00003B    byte        0x00        (real number)
  13569. >0x00003B    byte        0x01        (list)
  13570. >0x00003B    byte        0x02        (matrix)
  13571. >0x00003B    byte        0x03        (equation)
  13572. >0x00003B    byte        0x04        (string)
  13573. >0x00003B    byte        0x05        (program)
  13574. >0x00003B    byte        0x06        (assembly program)
  13575. >0x00003B    byte        0x07        (picture)
  13576. >0x00003B    byte        0x08        (gdb)
  13577. >0x00003B    byte        0x0C        (complex number)
  13578. >0x00003B    byte        0x0F        (window settings)
  13579. >0x00003B    byte        0x10        (zoom)
  13580. >0x00003B    byte        0x11        (table setup)
  13581. >0x00003B    byte        0x13        (backup)
  13582.  
  13583. # Magic Numbers for the TI-82
  13584. #
  13585. 0        string        **TI82**    TI-82 Graphing Calculator
  13586. >0x00003B    byte        0x00        (real)
  13587. >0x00003B    byte        0x01        (list)
  13588. >0x00003B    byte        0x02        (matrix)
  13589. >0x00003B    byte        0x03        (Y-variable)
  13590. >0x00003B    byte        0x05        (program)
  13591. >0x00003B    byte        0x06        (protected prgm)
  13592. >0x00003B    byte        0x07        (picture)
  13593. >0x00003B    byte        0x08        (gdb)
  13594. >0x00003B    byte        0x0B        (window settings)
  13595. >0x00003B    byte        0x0C        (window settings)
  13596. >0x00003B    byte        0x0D        (table setup)
  13597. >0x00003B    byte        0x0E        (screenshot)
  13598. >0x00003B    byte        0x0F        (backup)
  13599. #
  13600. # Magic Numbers for the TI-83
  13601. #
  13602. 0        string        **TI83**    TI-83 Graphing Calculator
  13603. >0x00003B    byte        0x00        (real)
  13604. >0x00003B    byte        0x01        (list)
  13605. >0x00003B    byte        0x02        (matrix)
  13606. >0x00003B    byte        0x03        (Y-variable)
  13607. >0x00003B    byte        0x04        (string)
  13608. >0x00003B    byte        0x05        (program)
  13609. >0x00003B    byte        0x06        (protected prgm)
  13610. >0x00003B    byte        0x07        (picture)
  13611. >0x00003B    byte        0x08        (gdb)
  13612. >0x00003B    byte        0x0B        (window settings)
  13613. >0x00003B    byte        0x0C        (window settings)
  13614. >0x00003B    byte        0x0D        (table setup)
  13615. >0x00003B    byte        0x0E        (screenshot)
  13616. >0x00003B    byte        0x13        (backup)
  13617. #
  13618. # Magic Numbers for the TI-83+
  13619. #
  13620. 0        string        **TI83F*    TI-83+ Graphing Calculator
  13621. >0x00003B    byte        0x00        (real number)
  13622. >0x00003B    byte        0x01        (list)
  13623. >0x00003B    byte        0x02        (matrix)
  13624. >0x00003B    byte        0x03        (equation)
  13625. >0x00003B    byte        0x04        (string)
  13626. >0x00003B    byte        0x05        (program)
  13627. >0x00003B    byte        0x06        (assembly program)
  13628. >0x00003B    byte        0x07        (picture)
  13629. >0x00003B    byte        0x08        (gdb)
  13630. >0x00003B    byte        0x0C        (complex number)
  13631. >0x00003B    byte        0x0F        (window settings)
  13632. >0x00003B    byte        0x10        (zoom)
  13633. >0x00003B    byte        0x11        (table setup)
  13634. >0x00003B    byte        0x13        (backup)
  13635. >0x00003B    byte        0x15        (application variable)
  13636. >0x00003B    byte        0x17        (group of variable)
  13637.  
  13638. #
  13639. # Magic Numbers for the TI-85
  13640. #
  13641. 0        string        **TI85**    TI-85 Graphing Calculator
  13642. >0x00003B    byte        0x00        (real number)
  13643. >0x00003B    byte        0x01        (complex number)
  13644. >0x00003B    byte        0x02        (real vector)
  13645. >0x00003B    byte        0x03        (complex vector)
  13646. >0x00003B    byte        0x04        (real list)
  13647. >0x00003B    byte        0x05        (complex list)
  13648. >0x00003B    byte        0x06        (real matrix)
  13649. >0x00003B    byte        0x07        (complex matrix)
  13650. >0x00003B    byte        0x08        (real constant)
  13651. >0x00003B    byte        0x09        (complex constant)
  13652. >0x00003B    byte        0x0A        (equation)
  13653. >0x00003B    byte        0x0C        (string)
  13654. >0x00003B    byte        0x0D        (function GDB)
  13655. >0x00003B    byte        0x0E        (polar GDB)
  13656. >0x00003B    byte        0x0F        (parametric GDB)
  13657. >0x00003B    byte        0x10        (diffeq GDB)
  13658. >0x00003B    byte        0x11        (picture)
  13659. >0x00003B    byte        0x12        (program)
  13660. >0x00003B    byte        0x13        (range)
  13661. >0x00003B    byte        0x17        (window settings)
  13662. >0x00003B    byte        0x18        (window settings)
  13663. >0x00003B    byte        0x19        (window settings)
  13664. >0x00003B    byte        0x1A        (window settings)
  13665. >0x00003B    byte        0x1B        (zoom)
  13666. >0x00003B    byte        0x1D        (backup)
  13667. >0x00003B    byte        0x1E        (unknown)
  13668. >0x00003B    byte        0x2A        (equation)
  13669. >0x000032    string        ZS4        - ZShell Version 4 File.
  13670. >0x000032    string        ZS3        - ZShell Version 3 File.
  13671. #
  13672. # Magic Numbers for the TI-86
  13673. #
  13674. 0        string        **TI86**    TI-86 Graphing Calculator
  13675. >0x00003B    byte        0x00        (real number)
  13676. >0x00003B    byte        0x01        (complex number)
  13677. >0x00003B    byte        0x02        (real vector)
  13678. >0x00003B    byte        0x03        (complex vector)
  13679. >0x00003B    byte        0x04        (real list)
  13680. >0x00003B    byte        0x05        (complex list)
  13681. >0x00003B    byte        0x06        (real matrix)
  13682. >0x00003B    byte        0x07        (complex matrix)
  13683. >0x00003B    byte        0x08        (real constant)
  13684. >0x00003B    byte        0x09        (complex constant)
  13685. >0x00003B    byte        0x0A        (equation)
  13686. >0x00003B    byte        0x0C        (string)
  13687. >0x00003B    byte        0x0D        (function GDB)
  13688. >0x00003B    byte        0x0E        (polar GDB)
  13689. >0x00003B    byte        0x0F        (parametric GDB)
  13690. >0x00003B    byte        0x10        (diffeq GDB)
  13691. >0x00003B    byte        0x11        (picture)
  13692. >0x00003B    byte        0x12        (program)
  13693. >0x00003B    byte        0x13        (range)
  13694. >0x00003B    byte        0x17        (window settings)
  13695. >0x00003B    byte        0x18        (window settings)
  13696. >0x00003B    byte        0x19        (window settings)
  13697. >0x00003B    byte        0x1A        (window settings)
  13698. >0x00003B    byte        0x1B        (zoom)
  13699. >0x00003B    byte        0x1D        (backup)
  13700. >0x00003B    byte        0x1E        (unknown)
  13701. >0x00003B    byte        0x2A        (equation)
  13702. #
  13703. # Magic Numbers for the TI-89
  13704. #
  13705. 0        string        **TI89**    TI-89 Graphing Calculator
  13706. >0x000048    byte        0x00        (expression)
  13707. >0x000048    byte        0x04        (list)
  13708. >0x000048    byte        0x06        (matrix)
  13709. >0x000048    byte        0x0A        (data)
  13710. >0x000048    byte        0x0B        (text)
  13711. >0x000048    byte        0x0C        (string)
  13712. >0x000048    byte        0x0D        (graphic data base)
  13713. >0x000048    byte        0x0E        (figure)
  13714. >0x000048    byte        0x10        (picture)
  13715. >0x000048    byte        0x12        (program)
  13716. >0x000048    byte        0x13        (function)
  13717. >0x000048    byte        0x14        (macro)
  13718. >0x000048    byte        0x1C        (zipped)
  13719. >0x000048    byte        0x21        (assembler)
  13720. #
  13721. # Magic Numbers for the TI-92
  13722. #
  13723. 0        string        **TI92**    TI-92 Graphing Calculator
  13724. >0x000048    byte        0x00        (expression)
  13725. >0x000048    byte        0x04        (list)
  13726. >0x000048    byte        0x06        (matrix)
  13727. >0x000048    byte        0x0A        (data)
  13728. >0x000048    byte        0x0B        (text)
  13729. >0x000048    byte        0x0C        (string)
  13730. >0x000048    byte        0x0D        (graphic data base)
  13731. >0x000048    byte        0x0E        (figure)
  13732. >0x000048    byte        0x10        (picture)
  13733. >0x000048    byte        0x12        (program)
  13734. >0x000048    byte        0x13        (function)
  13735. >0x000048    byte        0x14        (macro)
  13736. >0x000048    byte        0x1D        (backup)
  13737. #
  13738. # Magic Numbers for the TI-92+/V200
  13739. #
  13740. 0        string        **TI92P*    TI-92+/V200 Graphing Calculator
  13741. >0x000048    byte        0x00        (expression)
  13742. >0x000048    byte        0x04        (list)
  13743. >0x000048    byte        0x06        (matrix)
  13744. >0x000048    byte        0x0A        (data)
  13745. >0x000048    byte        0x0B        (text)
  13746. >0x000048    byte        0x0C        (string)
  13747. >0x000048    byte        0x0D        (graphic data base)
  13748. >0x000048    byte        0x0E        (figure)
  13749. >0x000048    byte        0x10        (picture)
  13750. >0x000048    byte        0x12        (program)
  13751. >0x000048    byte        0x13        (function)
  13752. >0x000048    byte        0x14        (macro)
  13753. >0x000048    byte        0x1C        (zipped)
  13754. >0x000048    byte        0x21        (assembler)
  13755. #
  13756. # Magic Numbers for the TI-73/83+/89/92+/V200 FLASH upgrades
  13757. #
  13758. 0x0000016    string        Advanced    TI-XX Graphing Calculator (FLASH)
  13759. 0        string        **TIFL**    TI-XX Graphing Calculator (FLASH)
  13760. >8        byte        >0        - Revision %d
  13761. >>9         byte        x        \b.%d,
  13762. >12        byte        >0        Revision date %02x
  13763. >>13        byte        x        \b/%02x
  13764. >>14        beshort        x        \b/%04x,
  13765. >17        string        >/0        name: '%s',
  13766. >48        byte        0x74        device: TI-73,
  13767. >48        byte        0x73        device: TI-83+,
  13768. >48        byte        0x98        device: TI-89,
  13769. >48        byte        0x88        device: TI-92+,
  13770. >49        byte        0x23        type: OS upgrade,
  13771. >49        byte        0x24        type: application,
  13772. >49        byte        0x25        type: certificate,
  13773. >49        byte        0x3e        type: license,
  13774. >74        lelong        >0        size: %ld bytes
  13775.  
  13776. # VTi & TiEmu skins (TI Graphing Calculators).
  13777. # From: Romain Lievin (roms@lpg.ticalc.org).
  13778. # Magic Numbers for the VTi skins
  13779. 0               string          VTI        Virtual TI skin
  13780. >3        string        v        - Version
  13781. >>4        byte        >0        \b %c
  13782. >>6        byte        x        \b.%c
  13783. # Magic Numbers for the TiEmu skins
  13784. 0        string        TiEmu        TiEmu skin
  13785. >6              string          v               - Version
  13786. >>7             byte            >0              \b %c
  13787. >>9             byte            x               \b.%c
  13788. >>10        byte        x        \b%c
  13789.  
  13790. #------------------------------------------------------------------------------
  13791. # timezone:  file(1) magic for timezone data
  13792. #
  13793. # from Daniel Quinlan (quinlan@yggdrasil.com)
  13794. # this should work on Linux, SunOS, and maybe others
  13795. # Added new official magic number for recent versions of the Olson code
  13796. 0    string    TZif    timezone data
  13797. 0    string    \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0    old timezone data
  13798. 0    string    \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0    old timezone data
  13799. 0    string  \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0    old timezone data
  13800. 0    string    \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0    old timezone data
  13801. 0    string    \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0    old timezone data
  13802. 0    string    \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\0    old timezone data
  13803. #------------------------------------------------------------------------------
  13804. # troff:  file(1) magic for *roff
  13805. #
  13806. # updated by Daniel Quinlan (quinlan@yggdrasil.com)
  13807.  
  13808. # troff input
  13809. 0    search/1    .\\"        troff or preprocessor input text
  13810. !:mime    text/troff
  13811. 0    search/1    '\\"        troff or preprocessor input text
  13812. !:mime    text/troff
  13813. 0    search/1    '.\\"        troff or preprocessor input text
  13814. !:mime    text/troff
  13815. 0    search/1    \\"        troff or preprocessor input text
  13816. !:mime    text/troff
  13817. 0    search/1    '''        troff or preprocessor input text
  13818. !:mime    text/troff
  13819.  
  13820. # ditroff intermediate output text
  13821. 0    search/1    x\ T        ditroff output text
  13822. >4    search/1    cat        for the C/A/T phototypesetter
  13823. >4    search/1    ps        for PostScript
  13824. >4    search/1    dvi        for DVI
  13825. >4    search/1    ascii        for ASCII
  13826. >4    search/1    lj4        for LaserJet 4
  13827. >4    search/1    latin1        for ISO 8859-1 (Latin 1)
  13828. >4    search/1    X75        for xditview at 75dpi
  13829. >>7    search/1    -12        (12pt)
  13830. >4    search/1    X100        for xditview at 100dpi
  13831. >>8    search/1    -12        (12pt)
  13832.  
  13833. # output data formats
  13834. 0    string        \100\357    very old (C/A/T) troff output data
  13835. #
  13836. #------------------------------------------------------------------------------
  13837. # tuxedo:    file(1) magic for BEA TUXEDO data files
  13838. #
  13839. # from Ian Springer <ispringer@hotmail.com>
  13840. #
  13841. 0    string        \0\0\1\236\0\0\0\0\0\0\0\0\0\0\0\0    BEA TUXEDO DES mask data
  13842.  
  13843. #------------------------------------------------------------------------------
  13844. # typeset:  file(1) magic for other typesetting
  13845. #
  13846. 0    string        Interpress/Xerox    Xerox InterPress data
  13847. >16    string        /            (version
  13848. >>17    string        >\0            %s)
  13849. #---------------------------------------------------------------------------
  13850. # Unicode:  BOM prefixed text files - Adrian Havill <havill@turbolinux.co.jp>
  13851. # GRR: These types should be recognised in file_ascmagic so these
  13852. # encodings can be treated by text patterns.
  13853. # Missing types are already dealt with internally.
  13854. #
  13855. 0    string    +/v8            Unicode text, UTF-7
  13856. 0    string    +/v9            Unicode text, UTF-7
  13857. 0    string    +/v+            Unicode text, UTF-7
  13858. 0    string    +/v/            Unicode text, UTF-7
  13859. 0    string    \335\163\146\163    Unicode text, UTF-8-EBCDIC
  13860. 0    string    \376\377\000\000    Unicode text, UTF-32, big-endian
  13861. 0    string    \377\376\000\000    Unicode text, UTF-32, little-endian
  13862. 0    string    \016\376\377        Unicode text, SCSU (Standard Compression Scheme for Unicode)
  13863.  
  13864. #------------------------------------------------------------------------------
  13865. # unknown:  file(1) magic for unknown machines
  13866. #
  13867. # XXX - this probably should be pruned, as it'll match PDP-11 and
  13868. # VAX image formats.
  13869. #
  13870. # 0x107 is 0407; 0x108 is 0410; both are PDP-11 (executable and pure,
  13871. # respectively).
  13872. #
  13873. # 0x109 is 0411; that's PDP-11 split I&D, but the PDP-11 version doesn't
  13874. # have the "version %ld", which may be a bogus COFFism (I don't think
  13875. # there ever was COFF for the PDP-11).
  13876. #
  13877. # 0x10B is 0413; that's VAX demand-paged, but this is a short, not a
  13878. # long, as it would be on a VAX.
  13879. #
  13880. # 0x10C is 0414 and 0x10E is 416; those *are* unknown.
  13881. #
  13882. 0    short        0x107        unknown machine executable
  13883. >8    short        >0        not stripped
  13884. >15    byte        >0        - version %ld
  13885. 0    short        0x108        unknown pure executable
  13886. >8    short        >0        not stripped
  13887. >15    byte        >0        - version %ld
  13888. 0    short        0x109        PDP-11 separate I&D
  13889. >8    short        >0        not stripped
  13890. >15    byte        >0        - version %ld
  13891. 0    short        0x10b        unknown pure executable
  13892. >8    short        >0        not stripped
  13893. >15    byte        >0        - version %ld
  13894. 0    long        0x10c        unknown demand paged pure executable
  13895. >16    long        >0        not stripped
  13896. 0    long        0x10e        unknown readable demand paged pure executable
  13897. #------------------------------------------------------------------------------
  13898. # uuencode:  file(1) magic for ASCII-encoded files
  13899. #
  13900.  
  13901. # GRR:  the first line of xxencoded files is identical to that in uuencoded
  13902. # files, but the first character in most subsequent lines is 'h' instead of
  13903. # 'M'.  (xxencoding uses lowercase letters in place of most of uuencode's
  13904. # punctuation and survives BITNET gateways better.)  If regular expressions
  13905. # were supported, this entry could possibly be split into two with
  13906. # "begin\040\.\*\012M" or "begin\040\.\*\012h" (where \. and \* are REs).
  13907. 0    search/1    begin\         uuencoded or xxencoded text
  13908.  
  13909. # btoa(1) is an alternative to uuencode that requires less space.
  13910. 0    search/1    xbtoa\ Begin    btoa'd text
  13911.  
  13912. # ship(1) is another, much cooler alternative to uuencode.
  13913. # Greg Roelofs, newt@uchicago.edu
  13914. 0    search/1    $\012ship    ship'd binary text
  13915.  
  13916. # bencode(8) is used to encode compressed news batches (Bnews/Cnews only?)
  13917. # Greg Roelofs, newt@uchicago.edu
  13918. 0    search/1    Decode\ the\ following\ with\ bdeco    bencoded News text
  13919.  
  13920. # BinHex is the Macintosh ASCII-encoded file format (see also "apple")
  13921. # Daniel Quinlan, quinlan@yggdrasil.com
  13922. 11    search/1    must\ be\ converted\ with\ BinHex    BinHex binary text
  13923. >41    search/1    x                    \b, version %.3s
  13924.  
  13925. # GRR: handle BASE64
  13926.  
  13927. #------------------------------------------------------------------------------
  13928. # varied.out:  file(1) magic for various USG systems
  13929. #
  13930. #    Herewith many of the object file formats used by USG systems.
  13931. #    Most have been moved to files for a particular processor,
  13932. #    and deleted if they duplicate other entries.
  13933. #
  13934. 0    short        0610        Perkin-Elmer executable
  13935. # AMD 29K
  13936. 0    beshort        0572        amd 29k coff noprebar executable
  13937. 0    beshort        01572        amd 29k coff prebar executable
  13938. 0    beshort        0160007        amd 29k coff archive
  13939. # Cray
  13940. 6    beshort        0407        unicos (cray) executable
  13941. # Ultrix 4.3
  13942. 596    string        \130\337\377\377    Ultrix core file
  13943. >600    string        >\0        from '%s'
  13944. # BeOS and MAcOS PEF executables
  13945. # From: hplus@zilker.net (Jon Watte)
  13946. 0    string        Joy!peffpwpc    header for PowerPC PEF executable
  13947. #
  13948. # ava assembler/linker Uros Platise <uros.platise@ijs.si>
  13949. 0       string          avaobj  AVR assembler object code
  13950. >7      string          >\0     version '%s'
  13951. # gnu gmon magic From: Eugen Dedu <dedu@ese-metz.fr>
  13952. 0    string        gmon        GNU prof performance data
  13953. >4    long        x        - version %ld
  13954. # From: Dave Pearson <davep@davep.org>
  13955. # Harbour <URL:http://www.harbour-project.org/> HRB files.
  13956. 0    string        \xc0HRB        Harbour HRB file
  13957. >4    short        x        version %d
  13958.  
  13959. # From: Alex Beregszaszi <alex@fsn.hu>
  13960. # 0    string        exec         BugOS executable
  13961. # 0    string        pack        BugOS archive
  13962.  
  13963. # From: Jason Spence <jspence@lightconsulting.com>
  13964. # Generated by the "examples" in STM's ST40 devkit, and derived code.
  13965. 0    lelong        0x13a9f17e    ST40 component image format
  13966. >4    string        >\0        \b, name '%s'
  13967.  
  13968. #------------------------------------------------------------------------------
  13969. # varied.script:  file(1) magic for various interpreter scripts
  13970.  
  13971. 0    string        #!\ /            a
  13972. >3    string        >\0            %s script text executable
  13973. 0    string        #!\t/            a
  13974. >3    string        >\0            %s script text executable
  13975. 0    string        #!/            a
  13976. >2    string        >\0            %s script text executable
  13977. 0    string        #!\             script text executable
  13978. >3    string        >\0            for %s
  13979.  
  13980. # From: arno <arenevier@fdn.fr>
  13981. # mozilla xpconnect typelib
  13982. # see http://www.mozilla.org/scriptable/typelib_file.html
  13983. 0    string         XPCOM\nTypeLib\r\n\032        XPConnect Typelib
  13984. >0x10  byte        x       version %d
  13985. >>0x11 byte        x      \b.%d
  13986.  
  13987. #------------------------------------------------------------------------------
  13988. # vax:  file(1) magic for VAX executable/object and APL workspace
  13989. #
  13990. 0    lelong        0101557        VAX single precision APL workspace
  13991. 0    lelong        0101556        VAX double precision APL workspace
  13992.  
  13993. #
  13994. # VAX a.out (32V, BSD)
  13995. #
  13996. 0    lelong        0407        VAX executable
  13997. >16    lelong        >0        not stripped
  13998.  
  13999. 0    lelong        0410        VAX pure executable
  14000. >16    lelong        >0        not stripped
  14001.  
  14002. 0    lelong        0413        VAX demand paged pure executable
  14003. >16    lelong        >0        not stripped
  14004.  
  14005. 0    lelong        0420        VAX demand paged (first page unmapped) pure executable
  14006. >16    lelong        >0        not stripped
  14007.  
  14008. #
  14009. # VAX COFF
  14010. #
  14011. # The `versions' should be un-commented if they work for you.
  14012. # (Was the problem just one of endianness?)
  14013. #
  14014. 0    leshort        0570        VAX COFF executable
  14015. >12    lelong        >0        not stripped
  14016. >22    leshort        >0        - version %ld
  14017. 0    leshort        0575        VAX COFF pure executable
  14018. >12    lelong        >0        not stripped
  14019. >22    leshort        >0        - version %ld
  14020.  
  14021. #------------------------------------------------------------------------------
  14022. # vicar:  file(1) magic for VICAR files.
  14023. #
  14024. # From: Ossama Othman <othman@astrosun.tn.cornell.edu
  14025. # VICAR is JPL's in-house spacecraft image processing program
  14026. # VICAR image
  14027. 0    string    LBLSIZE=    VICAR image data
  14028. >32    string    BYTE        \b, 8 bits  = VAX byte
  14029. >32    string    HALF        \b, 16 bits = VAX word     = Fortran INTEGER*2
  14030. >32    string    FULL        \b, 32 bits = VAX longword = Fortran INTEGER*4
  14031. >32    string    REAL        \b, 32 bits = VAX longword = Fortran REAL*4
  14032. >32    string    DOUB        \b, 64 bits = VAX quadword = Fortran REAL*8
  14033. >32    string    COMPLEX        \b, 64 bits = VAX quadword = Fortran COMPLEX*8
  14034. # VICAR label file
  14035. 43    string    SFDU_LABEL    VICAR label file
  14036. #------------------------------------------------------------------------------
  14037. # Virtutech Compressed Random Access File Format
  14038. #
  14039. # From <gustav@virtutech.com>
  14040. 0      string          \211\277\036\203        Virtutech CRAFF
  14041. >4     belong          x               v%d
  14042. >20    belong          0               uncompressed
  14043. >20    belong          1               bzipp2ed
  14044. >20    belong          2               gzipped
  14045. >24    belong          0               not clean
  14046.  
  14047. #------------------------------------------------------------------------------
  14048. # visx:  file(1) magic for Visx format files
  14049. #
  14050. 0    short        0x5555        VISX image file
  14051. >2    byte        0        (zero)
  14052. >2    byte        1        (unsigned char)
  14053. >2    byte        2        (short integer)
  14054. >2    byte        3        (float 32)
  14055. >2    byte        4        (float 64)
  14056. >2    byte        5        (signed char)
  14057. >2    byte        6        (bit-plane)
  14058. >2    byte        7        (classes)
  14059. >2    byte        8        (statistics)
  14060. >2    byte        10        (ascii text)
  14061. >2    byte        15        (image segments)
  14062. >2    byte        100        (image set)
  14063. >2    byte        101        (unsigned char vector)
  14064. >2    byte        102        (short integer vector)
  14065. >2    byte        103        (float 32 vector)
  14066. >2    byte        104        (float 64 vector)
  14067. >2    byte        105        (signed char vector)
  14068. >2    byte        106        (bit plane vector)
  14069. >2    byte        121        (feature vector)
  14070. >2    byte        122        (feature vector library)
  14071. >2    byte        124        (chain code)
  14072. >2    byte        126        (bit vector)
  14073. >2    byte        130        (graph)
  14074. >2    byte        131        (adjacency graph)
  14075. >2    byte        132        (adjacency graph library)
  14076. >2    string        .VISIX        (ascii text)
  14077.  
  14078. #------------------------------------------------------------------------------
  14079. # vms:  file(1) magic for VMS executables (experimental)
  14080. #
  14081. # VMS .exe formats, both VAX and AXP (Greg Roelofs, newt@uchicago.edu)
  14082.  
  14083. # GRR 950122:  I'm just guessing on these, based on inspection of the headers
  14084. # of three executables each for Alpha and VAX architectures.  The VAX files
  14085. # all had headers similar to this:
  14086. #
  14087. #   00000  b0 00 30 00 44 00 60 00  00 00 00 00 30 32 30 35  ..0.D.`.....0205
  14088. #   00010  01 01 00 00 ff ff ff ff  ff ff ff ff 00 00 00 00  ................
  14089. #
  14090. 0    string    \xb0\0\x30\0    VMS VAX executable
  14091. >44032    string    PK\003\004    \b, Info-ZIP SFX archive v5.12 w/decryption
  14092. #
  14093. # The AXP files all looked like this, except that the byte at offset 0x22
  14094. # was 06 in some of them and 07 in others:
  14095. #
  14096. #   00000  03 00 00 00 00 00 00 00  ec 02 00 00 10 01 00 00  ................
  14097. #   00010  68 00 00 00 98 00 00 00  b8 00 00 00 00 00 00 00  h...............
  14098. #   00020  00 00 07 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
  14099. #   00030  00 00 00 00 01 00 00 00  00 00 00 00 00 00 00 00  ................
  14100. #   00040  00 00 00 00 ff ff ff ff  ff ff ff ff 02 00 00 00  ................
  14101. #
  14102. 0    belong    0x03000000    VMS Alpha executable
  14103. >75264    string    PK\003\004    \b, Info-ZIP SFX archive v5.12 w/decryption
  14104.  
  14105. # -----------------------------------------------------------
  14106. # VMware specific files (deducted from version 1.1 and log file entries)
  14107. # Anthon van der Neut (anthon@mnt.org)
  14108. 0    belong    0x4d52564e    VMware nvram 
  14109.  
  14110. #------------------------------------------------------------------------------
  14111. # vorbis:  file(1) magic for Ogg/Vorbis files
  14112. #
  14113. # From Felix von Leitner <leitner@fefe.de>
  14114. # Extended by Beni Cherniavsky <cben@crosswinds.net>
  14115. # Further extended by Greg Wooledge <greg@wooledge.org>
  14116. #
  14117. # Most (everything but the number of channels and bitrate) is commented
  14118. # out with `##' as it's not interesting to the average user.  The most
  14119. # probable things advanced users would want to uncomment are probably
  14120. # the number of comments and the encoder version.
  14121. #
  14122. # FIXME: The first match has been made a search, so that it can skip
  14123. # over prepended ID3 tags. This will work for MIME type detection, but
  14124. # won't work for detecting other properties of the file (they all need
  14125. # to be made relative to the search). In any case, if the file has ID3
  14126. # tags, the ID3 information will be printed, not the Ogg information,
  14127. # so until that's fixed, this doesn't matter.
  14128. #
  14129. # --- Ogg Framing ---
  14130. 0        search/1000    OggS        Ogg data
  14131. !:mime        application/ogg
  14132. >4        byte        !0        UNKNOWN REVISION %u
  14133. ##>4        byte        0        revision 0
  14134. >4        byte        0
  14135. ##>>14        lelong        x        (Serial %lX)
  14136. # non-Vorbis content: FLAC (Free Lossless Audio Codec, http://flac.sourceforge.net)
  14137. >>28        string        \x7fFLAC    \b, FLAC audio
  14138. # non-Vorbis content: Theora
  14139. >>28        string        \x80theora    \b, Theora video
  14140. # non-Vorbis content: Kate
  14141. >>28        string        \x80kate\0\0\0\0    \b, Kate
  14142. >>>37        ubyte        x        v%u
  14143. >>>38        ubyte        x        \b.%u,
  14144. >>>40        byte        0        utf8 encoding,
  14145. >>>40        byte        !0        unknown character encoding,
  14146. >>>60        string        >\0        language %s,
  14147. >>>60        string        \0        no language set,
  14148. >>>76        string        >\0        category %s
  14149. >>>76        string        \0        no category set
  14150. # non-Vorbis content: Skeleton
  14151. >>28        string        fishead\0    \b, Skeleton
  14152. >>>36        short        x        v%u
  14153. >>>40        short        x        \b.%u
  14154. # non-Vorbis content: Speex
  14155. >>28        string        Speex\ \ \     \b, Speex audio
  14156. # non-Vorbis content: OGM
  14157. >>28        string        \x01video\0\0\0    \b, OGM video
  14158. >>>37        string/c    div3        (DivX 3)
  14159. >>>37        string/c    divx        (DivX 4)
  14160. >>>37        string/c    dx50        (DivX 5)
  14161. >>>37        string/c    xvid        (XviD)
  14162. # --- First vorbis packet - general header ---
  14163. >>28        string        \x01vorbis    \b, Vorbis audio,
  14164. >>>35        lelong        !0        UNKNOWN VERSION %lu,
  14165. ##>>>35        lelong        0        version 0,
  14166. >>>35        lelong        0
  14167. >>>>39        ubyte        1        mono,
  14168. >>>>39        ubyte        2        stereo,
  14169. >>>>39        ubyte        >2        %u channels,
  14170. >>>>40        lelong        x        %lu Hz
  14171. # Minimal, nominal and maximal bitrates specified when encoding
  14172. >>>>48        string        <\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff    \b,
  14173. # The above tests if at least one of these is specified:
  14174. >>>>>52        lelong        !-1
  14175. # Vorbis RC2 has a bug which puts -1000 in the min/max bitrate fields
  14176. # instead of -1.
  14177. # Vorbis 1.0 uses 0 instead of -1.
  14178. >>>>>>52    lelong        !0
  14179. >>>>>>>52    lelong        !-1000
  14180. >>>>>>>>52    lelong        x        <%lu
  14181. >>>>>48        lelong        !-1
  14182. >>>>>>48    lelong        x        ~%lu
  14183. >>>>>44        lelong        !-1
  14184. >>>>>>44    lelong        !-1000
  14185. >>>>>>>44    lelong        !0
  14186. >>>>>>>>44    lelong        x        >%lu
  14187. >>>>>48        string        <\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff    bps
  14188. # -- Second vorbis header packet - the comments
  14189. # A kludge to read the vendor string.  It's a counted string, not a
  14190. # zero-terminated one, so file(1) can't read it in a generic way.
  14191. # libVorbis is the only one existing currently, so I detect specifically
  14192. # it.  The interesting value is the cvs date (8 digits decimal).
  14193. # Post-RC1 Ogg files have the second header packet (and thus the version)
  14194. # in a different place, so we must use an indirect offset.
  14195. >>>(84.b+85)        string        \x03vorbis
  14196. >>>>(84.b+96)        string/c    Xiphophorus\ libVorbis\ I    \b, created by: Xiphophorus libVorbis I
  14197. >>>>>(84.b+120)        string        >00000000    
  14198. # Map to beta version numbers:
  14199. >>>>>>(84.b+120)    string        <20000508    (<beta1, prepublic)
  14200. >>>>>>(84.b+120)    string        20000508    (1.0 beta 1 or beta 2)
  14201. >>>>>>(84.b+120)    string        >20000508
  14202. >>>>>>>(84.b+120)    string        <20001031    (beta2-3)
  14203. >>>>>>(84.b+120)    string        20001031    (1.0 beta 3)
  14204. >>>>>>(84.b+120)    string        >20001031
  14205. >>>>>>>(84.b+120)    string        <20010225    (beta3-4)
  14206. >>>>>>(84.b+120)    string        20010225    (1.0 beta 4)
  14207. >>>>>>(84.b+120)    string        >20010225
  14208. >>>>>>>(84.b+120)    string        <20010615    (beta4-RC1)
  14209. >>>>>>(84.b+120)    string        20010615    (1.0 RC1)
  14210. >>>>>>(84.b+120)    string        20010813    (1.0 RC2)
  14211. >>>>>>(84.b+120)    string        20010816    (RC2 - Garf tuned v1)
  14212. >>>>>>(84.b+120)    string        20011014    (RC2 - Garf tuned v2)
  14213. >>>>>>(84.b+120)    string        20011217    (1.0 RC3)
  14214. >>>>>>(84.b+120)    string        20011231    (1.0 RC3)
  14215. # Some pre-1.0 CVS snapshots still had "Xiphphorus"...
  14216. >>>>>>(84.b+120)    string        >20011231    (pre-1.0 CVS)
  14217. # For the 1.0 release, Xiphophorus is replaced by Xiph.Org
  14218. >>>>(84.b+96)        string/c    Xiph.Org\ libVorbis\ I    \b, created by: Xiph.Org libVorbis I
  14219. >>>>>(84.b+117)        string        >00000000    
  14220. >>>>>>(84.b+117)    string        <20020717    (pre-1.0 CVS)
  14221. >>>>>>(84.b+117)    string        20020717    (1.0)
  14222. >>>>>>(84.b+117)    string        20030909    (1.0.1)
  14223. >>>>>>(84.b+117)    string        20040629    (1.1.0 RC1)
  14224.  
  14225. #------------------------------------------------------------------------------
  14226. # VXL: file(1) magic for VXL binary IO data files
  14227. #
  14228. # from Ian Scott <scottim@sf.net>
  14229. #
  14230. # VXL is a collection of C++ libraries for Computer Vision.
  14231. # See the vsl chapter in the VXL Book for more info
  14232. # http://www.isbe.man.ac.uk/public_vxl_doc/books/vxl/book.html
  14233. # http:/vxl.sf.net
  14234.  
  14235. 2    lelong    0x472b2c4e    VXL data file,
  14236. >0    leshort    >0        schema version no %d
  14237. #------------------------------------------------------------------------------
  14238. # wordprocessors:  file(1) magic fo word processors.
  14239. #
  14240. ####### PWP file format used on Smith Corona Personal Word Processors:
  14241. 2    string    \040\040\040\040\040\040\040\040\040\040\040ML4D\040'92    Smith Corona PWP
  14242. >24    byte    2    \b, single spaced
  14243. >24    byte    3    \b, 1.5 spaced
  14244. >24    byte    4    \b, double spaced
  14245. >25    byte    0x42    \b, letter
  14246. >25    byte    0x54    \b, legal
  14247. >26    byte    0x46    \b, A4
  14248.  
  14249. #WordPerfect type files Version 1.6 - PLEASE DO NOT REMOVE THIS LINE
  14250. 0    string    \377WPC\020\000\000\000\022\012\001\001\000\000\000\000    (WP) loadable file
  14251. >15    byte    0    Optimized for Intel
  14252. >15    byte    1    Optimized for Non-Intel
  14253. 1    string    WPC    (Corel/WP)
  14254. >8    short    257    WordPerfect macro
  14255. >8    short    258    WordPerfect help file
  14256. >8    short    259    WordPerfect keyboard file
  14257. >8    short    266    WordPerfect document
  14258. >8    short    267    WordPerfect dictionary
  14259. >8    short    268    WordPerfect thesaurus
  14260. >8    short    269    WordPerfect block
  14261. >8    short    270    WordPerfect rectangular block
  14262. >8    short    271    WordPerfect column block
  14263. >8    short    272    WordPerfect printer data
  14264. >8    short    275    WordPerfect printer data
  14265. >8    short    276    WordPerfect driver resource data
  14266. >8    short    279    WordPerfect hyphenation code
  14267. >8    short    280    WordPerfect hyphenation data
  14268. >8    short    281    WordPerfect macro resource data
  14269. >8    short    283    WordPerfect hyphenation lex
  14270. >8    short    285    WordPerfect wordlist
  14271. >8    short    286    WordPerfect equation resource data
  14272. >8    short    289    WordPerfect spell rules
  14273. >8    short    290    WordPerfect dictionary rules
  14274. >8    short    295    WordPerfect spell rules (Microlytics)
  14275. >8    short    299    WordPerfect settings file
  14276. >8    short    301    WordPerfect 4.2 document
  14277. >8    short    325    WordPerfect dialog file
  14278. >8    short    332    WordPerfect button bar
  14279. >8    short    513    Shell macro
  14280. >8    short    522    Shell definition
  14281. >8    short    769    Notebook macro
  14282. >8    short    770    Notebook help file
  14283. >8    short    771    Notebook keyboard file
  14284. >8    short    778    Notebook definition
  14285. >8    short    1026    Calculator help file
  14286. >8    short     1538    Calendar help file
  14287. >8    short     1546    Calendar data file
  14288. >8    short    1793    Editor macro
  14289. >8    short    1794    Editor help file
  14290. >8    short    1795    Editor keyboard file
  14291. >8    short    1817    Editor macro resource file
  14292. >8    short     2049    Macro editor macro
  14293. >8    short     2050    Macro editor help file
  14294. >8    short    2051    Macro editor keyboard file
  14295. >8    short    2305    PlanPerfect macro
  14296. >8    short    2306    PlanPerfect help file
  14297. >8    short    2307    PlanPerfect keyboard file
  14298. >8    short    2314    PlanPerfect worksheet
  14299. >8    short    2319    PlanPerfect printer definition
  14300. >8    short    2322    PlanPerfect graphic definition
  14301. >8    short    2323    PlanPerfect data
  14302. >8    short    2324    PlanPerfect temporary printer
  14303. >8    short    2329    PlanPerfect macro resource data
  14304. >8    byte    11    Mail
  14305. >8    short    2818    help file
  14306. >8    short    2821    distribution list
  14307. >8    short    2826    out box
  14308. >8    short    2827    in box
  14309. >8    short    2836    users archived mailbox
  14310. >8    short    2837    archived message database
  14311. >8    short    2838    archived attachments
  14312. >8    short    3083    Printer temporary file
  14313. >8    short    3330    Scheduler help file
  14314. >8    short    3338    Scheduler in file
  14315. >8    short    3339    Scheduler out file
  14316. >8    short    3594    GroupWise settings file
  14317. >8    short    3601    GroupWise directory services
  14318. >8    short    3627    GroupWise settings file
  14319. >8    short    4362    Terminal resource data
  14320. >8    short    4363    Terminal resource data
  14321. >8    short    4395    Terminal resource data
  14322. >8    short    4619    GUI loadable text
  14323. >8    short    4620    graphics resource data
  14324. >8    short    4621    printer settings file
  14325. >8    short    4622    port definition file
  14326. >8    short    4623    print queue parameters
  14327. >8    short    4624    compressed file
  14328. >8    short    5130    Network service msg file
  14329. >8    short    5131    Network service msg file
  14330. >8    short    5132    Async gateway login msg
  14331. >8    short    5134    GroupWise message file
  14332. >8    short    7956    GroupWise admin domain database
  14333. >8    short    7957    GroupWise admin host database
  14334. >8    short    7959    GroupWise admin remote host database
  14335. >8    short    7960    GroupWise admin ADS deferment data file
  14336. >8    short    8458    IntelliTAG (SGML) compiled DTD
  14337. >8    long    18219264    WordPerfect graphic image (1.0)
  14338. >8    long    18219520    WordPerfect graphic image (2.0)
  14339. #end of WordPerfect type files Version 1.6 - PLEASE DO NOT REMOVE THIS LINE
  14340.  
  14341. # Hangul (Korean) Word Processor File
  14342. 0    string    HWP\ Document\ File    Hangul (Korean) Word Processor File 3.0
  14343. # From: Won-Kyu Park <wkpark@kldp.org>
  14344. 512    string        R\0o\0o\0t\0    Hangul (Korean) Word Processor File 2000
  14345. !:mime    application/x-hwp
  14346.  
  14347. # CosmicBook, from Benoεt Rouits
  14348. 0       string  CSBK    Ted Neslson's CosmicBook hypertext file
  14349.  
  14350. 2       string  EYWR    AmigaWriter file
  14351.  
  14352. # chi:  file(1) magic for ChiWriter files
  14353. 0       string          \\1cw\          ChiWriter file
  14354. >5      string          >\0             version %s
  14355. 0       string          \\1cw           ChiWriter file
  14356.  
  14357. # Quark Express from http://www.garykessler.net/library/file_sigs.html
  14358. 2    string    IIXPR3            Intel Quark Express Document (English)
  14359. 2    string    IIXPRa            Intel Quark Express Document (Korean)
  14360. 2    string    MMXPR3            Motorola Quark Express Document (English)
  14361. !:mime    application/x-quark-xpress-3
  14362. 2    string    MMXPRa            Motorola Quark Express Document (Korean)
  14363.  
  14364. # adobe indesign (document, whatever...) from querkan
  14365. 0    belong    0x0606edf5        Adobe InDesign
  14366. >16    string    DOCUMENT        Document
  14367.  
  14368. #------------------------------------------------------------------------------
  14369. # ichitaro456: file(1) magic for Just System Word Processor Ichitaro
  14370. #
  14371. # Contributor kenzo-:
  14372. # Reversed-engineered JS Ichitaro magic numbers
  14373. #
  14374.  
  14375. 0    string        DOC
  14376. >43    byte        0x14    Just System Word Processor Ichitaro v4
  14377. !:mime    application/x-ichitaro4
  14378. >144    string    JDASH        application/x-ichitaro4
  14379.  
  14380. 0    string        DOC
  14381. >43    byte        0x15    Just System Word Processor Ichitaro v5
  14382. !:mime    application/x-ichitaro5
  14383.  
  14384. 0    string        DOC
  14385. >43    byte        0x16    Just System Word Processor Ichitaro v6
  14386. !:mime    application/x-ichitaro6
  14387.  
  14388. # Type: Freemind mindmap documents
  14389. # From: Jamie Thompson <debian-bugs@jamie-thompson.co.uk>
  14390. 0    string/cB    \<map\ version    Freemind document
  14391. !:mime    application/x-freemind
  14392.  
  14393. # Type:        Scribus
  14394. # From:        Werner Fink <werner@suse.de>
  14395. 0    string    \<SCRIBUSUTF8\ Version        Scribus Document
  14396. 0    string    \<SCRIBUSUTF8NEW\ Version    Scribus Document
  14397. !:mime    application/x-scribus
  14398.  
  14399. #------------------------------------------------------------------------------
  14400. # file(1) magic(5) data for xdelta  Josh MacDonald <jmacd@CS.Berkeley.EDU>
  14401. #
  14402. 0    string    %XDELTA%    XDelta binary patch file 0.14
  14403. 0    string    %XDZ000%    XDelta binary patch file 0.18
  14404. 0    string    %XDZ001%    XDelta binary patch file 0.20
  14405. 0    string    %XDZ002%    XDelta binary patch file 1.0
  14406. 0    string    %XDZ003%    XDelta binary patch file 1.0.4
  14407. 0    string    %XDZ004%    XDelta binary patch file 1.1
  14408.  
  14409. #------------------------------------------------------------------------------
  14410. # xenix:  file(1) magic for Microsoft Xenix
  14411. #
  14412. # "Middle model" stuff, and "Xenix 8086 relocatable or 80286 small
  14413. # model" lifted from "magic.xenix", with comment "derived empirically;
  14414. # treat as folklore until proven"
  14415. #
  14416. # "small model", "large model", "huge model" stuff lifted from XXX
  14417. #
  14418. # XXX - "x.out" collides with PDP-11 archives
  14419. #
  14420. 0    string        core        core file (Xenix)
  14421. 0    byte        0x80        8086 relocatable (Microsoft)
  14422. 0    leshort        0xff65        x.out
  14423. >2    string        __.SYMDEF     randomized
  14424. >0    byte        x        archive
  14425. 0    leshort        0x206        Microsoft a.out
  14426. >8    leshort        1        Middle model
  14427. >0x1e    leshort        &0x10        overlay
  14428. >0x1e    leshort        &0x2        separate
  14429. >0x1e    leshort        &0x4        pure
  14430. >0x1e    leshort        &0x800        segmented
  14431. >0x1e    leshort        &0x400        standalone
  14432. >0x1e    leshort        &0x8        fixed-stack
  14433. >0x1c    byte        &0x80        byte-swapped
  14434. >0x1c    byte        &0x40        word-swapped
  14435. >0x10    lelong        >0        not-stripped
  14436. >0x1e    leshort        ^0xc000        pre-SysV
  14437. >0x1e    leshort        &0x4000        V2.3
  14438. >0x1e    leshort        &0x8000        V3.0
  14439. >0x1c    byte        &0x4        86
  14440. >0x1c    byte        &0xb        186
  14441. >0x1c    byte        &0x9        286
  14442. >0x1c    byte        &0xa        386
  14443. >0x1f    byte        <0x040        small model
  14444. >0x1f    byte        =0x048        large model    
  14445. >0x1f    byte        =0x049        huge model 
  14446. >0x1e    leshort        &0x1        executable
  14447. >0x1e    leshort        ^0x1        object file
  14448. >0x1e    leshort        &0x40        Large Text
  14449. >0x1e    leshort        &0x20        Large Data
  14450. >0x1e    leshort        &0x120        Huge Objects Enabled
  14451. >0x10    lelong        >0        not stripped
  14452.  
  14453. 0    leshort        0x140        old Microsoft 8086 x.out
  14454. >0x3    byte        &0x4        separate
  14455. >0x3    byte        &0x2        pure
  14456. >0    byte        &0x1        executable
  14457. >0    byte        ^0x1        relocatable
  14458. >0x14    lelong        >0        not stripped
  14459.  
  14460. 0    lelong        0x206        b.out
  14461. >0x1e    leshort        &0x10        overlay
  14462. >0x1e    leshort        &0x2        separate
  14463. >0x1e    leshort        &0x4        pure
  14464. >0x1e    leshort        &0x800        segmented
  14465. >0x1e    leshort        &0x400        standalone
  14466. >0x1e    leshort        &0x1        executable
  14467. >0x1e    leshort        ^0x1        object file
  14468. >0x1e    leshort        &0x4000        V2.3
  14469. >0x1e    leshort        &0x8000        V3.0
  14470. >0x1c    byte        &0x4        86
  14471. >0x1c    byte        &0xb        186
  14472. >0x1c    byte        &0x9        286
  14473. >0x1c    byte        &0x29        286
  14474. >0x1c    byte        &0xa        386
  14475. >0x1e    leshort        &0x4        Large Text
  14476. >0x1e    leshort        &0x2        Large Data
  14477. >0x1e    leshort        &0x102        Huge Objects Enabled
  14478.  
  14479. 0    leshort        0x580        XENIX 8086 relocatable or 80286 small model
  14480.  
  14481. #------------------------------------------------------------------------------
  14482. # This is Aaron's attempt at a MAGIC file for Xilinx .bit files.
  14483. # Xilinx-Magic@RevRagnarok.com
  14484. # Got the info from FPGA-FAQ 0026
  14485. #
  14486. # First there is the sync header and its length
  14487. 0    beshort 0x0009
  14488. >2     belong    =0x0ff00ff0
  14489. >>&0    belong  =0x0ff00ff0
  14490. >>>&0    beshort =0x0000    
  14491. >>>>&0    pstring    a    Xilinx BIT data
  14492. # Next is a Pascal-style string with the NCD name. We want to capture that.
  14493. >>>>0x0F    pstring    x    - from %s
  14494. # It is followed by a NUL
  14495. >>>>>&1    byte    0x00
  14496. # And then 'b'
  14497. >>>>>&2    string b
  14498. # With the part number:
  14499. #>>>>>&5 string    4v    (Virtex4)
  14500. #>>>>>&5 string  2v    (Virtex II
  14501. #>>>>>>&0    string    !p    \b)
  14502. #>>>>>>&0    string    p    Pro)
  14503. >>>>>&4    pstring x    - for %s
  14504. # And then NUL / 'c' / Build Data / NUL / 'd' / Date / NUL / 'e' / Data Length
  14505. >>>>>>&1    byte    0x00
  14506. >>>>>>&2    string    c
  14507. >>>>>>&4    pstring    x    - built %s
  14508. >>>>>>>&1    byte    0x00
  14509. >>>>>>>&2    string    d
  14510. >>>>>>>&4    pstring    x    \b(%s)
  14511. >>>>>>>>&1    byte    0x00
  14512. >>>>>>>>&2    string    e
  14513. >>>>>>>>&4    belong    x    - data length 0x%lx
  14514.  
  14515. #------------------------------------------------------------------------------
  14516. # xo65 object files
  14517. # From: "Ullrich von Bassewitz" <uz@cc65.org>
  14518. #
  14519. 0    string        \x55\x7A\x6E\x61    xo65 object,
  14520. >4    leshort        x            version %d,
  14521. >6    leshort&0x0001 =0x0001            with debug info
  14522. >6    leshort&0x0001 =0x0000            no debug info
  14523.  
  14524. # xo65 library files
  14525. 0    string        \x6E\x61\x55\x7A    xo65 library,
  14526. >4    leshort        x            version %d
  14527.  
  14528. # o65 object files
  14529. 0    string        \x01\x00\x6F\x36\x35    o65
  14530. >6    leshort&0x1000    =0x0000            executable,
  14531. >6    leshort&0x1000    =0x1000            object,
  14532. >5    byte        x            version %d,
  14533. >6    leshort&0x8000    =0x8000            65816,
  14534. >6    leshort&0x8000    =0x0000            6502,
  14535. >6    leshort&0x2000    =0x2000            32 bit,
  14536. >6    leshort&0x2000    =0x0000            16 bit,
  14537. >6    leshort&0x4000    =0x4000            page reloc,
  14538. >6    leshort&0x4000    =0x0000            byte reloc,
  14539. >6    leshort&0x0003    =0x0000            alignment 1
  14540. >6    leshort&0x0003    =0x0001            alignment 2
  14541. >6    leshort&0x0003    =0x0002            alignment 4
  14542. >6    leshort&0x0003    =0x0003            alignment 256
  14543.  
  14544. #------------------------------------------------------------------------------
  14545. # xwindows:  file(1) magic for various X/Window system file formats.
  14546.  
  14547. # Compiled X Keymap 
  14548. # XKM (compiled X keymap) files (including version and byte ordering)
  14549. 1    string    mkx                Compiled XKB Keymap: lsb,
  14550. >0    byte    >0                version %d
  14551. >0    byte    =0                obsolete
  14552. 0    string    xkm                Compiled XKB Keymap: msb,
  14553. >3    byte    >0                version %d
  14554. >0    byte    =0                obsolete
  14555.  
  14556. # xfsdump archive
  14557. 0    string    xFSdump0            xfsdump archive
  14558. >8    belong    x    (version %d)
  14559.  
  14560. # Jaleo XFS files
  14561. 0    long    395726                Jaleo XFS file
  14562. >4    long    x                - version %ld
  14563. >8    long    x                - [%ld -
  14564. >20    long    x                %ldx
  14565. >24    long    x                %ldx
  14566. >28    long    1008                YUV422]
  14567. >28    long    1000                RGB24]
  14568.  
  14569. #------------------------------------------------------------------------------
  14570. # zilog:  file(1) magic for Zilog Z8000.
  14571. #
  14572. # Was it big-endian or little-endian?  My Product Specification doesn't
  14573. # say.
  14574. #
  14575. 0    long        0xe807        object file (z8000 a.out)
  14576. 0    long        0xe808        pure object file (z8000 a.out)
  14577. 0    long        0xe809        separate object file (z8000 a.out)
  14578. 0    long        0xe805        overlay object file (z8000 a.out)
  14579.  
  14580. #------------------------------------------------------------------------------
  14581. # zyxel:  file(1) magic for ZyXEL modems
  14582. #
  14583. # From <rob@pe1chl.ampr.org>
  14584. # These are the /etc/magic entries to decode datafiles as used for the
  14585. # ZyXEL U-1496E DATA/FAX/VOICE modems.  (This header conforms to a
  14586. # ZyXEL-defined standard)
  14587.  
  14588. 0    string        ZyXEL\002    ZyXEL voice data
  14589. >10    byte        0        - CELP encoding
  14590. >10    byte&0x0B    1        - ADPCM2 encoding
  14591. >10    byte&0x0B    2        - ADPCM3 encoding
  14592. >10    byte&0x0B    3        - ADPCM4 encoding
  14593. >10    byte&0x0B    8        - New ADPCM3 encoding
  14594. >10    byte&0x04    4        with resync
  14595.